Hello, I have a form in the modal to edit product data. There is one field as required. Submitting form without filling that value will give me error, that this field is required but when I close that modal and reopen it for another product, that error remains there although value is there. Is there any way to reset form validations on modal close?
Hi Vinkal! It doesn't look like the date time picker component has any functions available to clear the validation state. Is there a reason you have it required in your form?
Hi @victoria ,
I have a form in a modal where I have used datetime picker as a required field. So when I am submitting the form without date, it's indicating the error as required field, this is correct. But after closing modal, re-opening that modal, that error still remains there. So I need to clear that validation for datetime picker when I close a modal.
It looks like we don't currently have any way to clear the validation state of a datetime picker, but I will file this as a bug report internally! I'll tag this thread to reach out to with any updates.
Solved. Looks like it's been renamed to clearValidation() instead of clearValidationState().
Is this function documented anywhere?
The docs found here Retool | Component Reference don't mention any of the functions available on the text component.
Hi @Col! Awesome, glad you found it. It doesn't like it's documented anywhere. In general, the best way to see what kind of functions are available on a component would be to look through the autocomplete menu for an "Function"s. There's usually a small blurb over those functions that explain how to use them!