Dependency Cycle In Custom Validation

I recently updated my custom module which is a small form and have receive the following warning when the module is loaded on my app.

Dependency Cycle Found:
myModal1::form1.@FormAggregationChain ->
myModal1::dateRange1 ->
myModal1::dateRange1.customValidation -> ->

The change that I made to the module is a custom validation on a date range. If either start or end of the date range are empty AND a checkbox is false then it prevents submission but if the checkbox is true it is allowed. Otherwise if the start & end are both filled the checkbox can be false.

Hi @kindredAsaf,

Can you send some screenshots of your build to try to reproduce it? Was able to add validation referencing the date range elements + checkbox value both in the form's submit disable configuration and the date range validation itself.


Hi @jmann ,

Thanks so much for getting back to me. I actually solved this Friday afternoon after doing some more research and looking at other examples I found by googling around.

The issue was mainly that I'm new to retool and misunderstood how to use my form. In my custom validation I was using data that is only available once the form is submitted rather than the values directly from the input. For example vs. dateRange1.startDate.value.

Once I realized my mistake and fixed it the error went away.

No problem, thank you for looping back with the solution here! :grinning: