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
I want to reset $validation passed to my component that's wrapped by validated. I tried calling initValidation within validated; however, that did not work. How/when do I call initValidation so that I can reset the validation?
Details
I'm trying to implement the following UX:
User visits page with form
User fills out fields in form
User submits form
After form is submitted, the fields are cleared so they can resubmit the form with new/different data.
I have the validation in place as per the documentation and it is working; however, I'm trying to find a way to reset the properties on the $validation prop so that the form doesn't appear to be invalid when their values are reset to their defaults via setState
Is the correct way to achieve this by calling initValidation()? If so, when should this method be called? I've tried calling it in validated. For example:
Summary
I want to reset
$validation
passed to my component that's wrapped byvalidated
. I tried callinginitValidation
withinvalidated
; however, that did not work. How/when do I callinitValidation
so that I can reset the validation?Details
I'm trying to implement the following UX:
I have the validation in place as per the documentation and it is working; however, I'm trying to find a way to reset the properties on the
$validation
prop so that the form doesn't appear to be invalid when their values are reset to their defaults viasetState
Is the correct way to achieve this by calling
initValidation()
? If so, when should this method be called? I've tried calling it invalidated
. For example:But this doesn't seem to work.
The text was updated successfully, but these errors were encountered: