Form and Text Input validation not working right

I have a form that also has a tabbed container. The form's validate function (when Validate form on submit is selected) ignores the inputs in the container. If these inputs are invalid, the form submits anyway.

So my first workaround is to check those manually, but hitting problems there as well. My submit js query checks the validationState of each of the ignored components and fires the SQL query if all is good.

But, validationState does not seem to be set until after onBlur of the component or sometime at some random time. I tried using .focus() to force the onBlur but it has no effect.

My final workaround would be to manually validate the values within the submit query, but would rather keep all of my validation within the components.

Hi Bradly,

´╗┐Unfortunately, Retool does not currently support validating from a tabbed container within a form. There's a bug report out for this which we have added you to so we can keep you up to date as a fix is merged.

´╗┐In the meantime, the best workaround that will `save you some time vs. javascript is to add the components within the container for validation to "External Inputs to Validate". Please see the image below for an example and let me know if you have any other questions.

Thanks!
Grace



1 Like