Closed jacobweberbowery closed 1 year ago
I have the same issue. A workaround we use for now is
form.reset();
form.each(field => field.resetValidation());
resetValidation()
is now performed on reset and clear instead of validate()
Also introduced validateOnClear
& validateOnReset
form options (disabled by default).
Thanks!
Hi. I have a form where all fields are required, and their default values are empty. I'm using
hasError
in my bindings to indicate which fields have errors.I don't want errors to appear until the user at least focuses a field, so I set
validateOnInit: false
.But when I reset the form to its initial values using
form.reset()
, I want to put it back in that initial state, so the errors no longer appear.I tried setting
showErrorsOnReset: false
, and this prevents the error text from appearing. But thehasError
property still becomes true. Is there a way to prevent this?