You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to clear the validation state of the form programmatically?
Use-case: I have a form with conditional fields that are controlled via a select, if you choose option1 and submit without a value it creates a validation error on fieldA, if you choose option2 it shows fieldB, the form validation is still success: false due to the previous submission.
Ideally, when switching between fields/schemas I'd like to clear the validation that was done previously.
Calling zo.validate() isn't ideal as that means all of the fields will then be validated, rather than being clean/fresh.
Perhaps a resetValidation or validationReset could be added here?
Is it possible to clear the validation state of the form programmatically?
Use-case: I have a form with conditional fields that are controlled via a select, if you choose
option1
and submit without a value it creates a validation error onfieldA
, if you chooseoption2
it showsfieldB
, the form validation is stillsuccess: false
due to the previous submission.Ideally, when switching between fields/schemas I'd like to clear the validation that was done previously.
Calling
zo.validate()
isn't ideal as that means all of the fields will then be validated, rather than being clean/fresh.Perhaps a
resetValidation
orvalidationReset
could be added here?Perhaps it could be
zo.validate({ reset: true })
or something similar if the above option isn't ideal?The text was updated successfully, but these errors were encountered: