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 have a scenario that i have a form with a few inputs, and 1 input is invalid.
Then i remove ALL inputs from the form.
and the form stays invalid, even though it is empty => valid.
I think this happens is because Formsy runs validation only when it has at least one input.
It seems the function validateForm in main.js validates only forms that contain at least 1 input.
I believe adding isValid: true, would fix that:
if (!this.inputs.length) {
this.setState({
canChange: true,
isValid: true,
});
}
What do u think?
Thanks
The text was updated successfully, but these errors were encountered:
I have a scenario that i have a form with a few inputs, and 1 input is invalid.
Then i remove ALL inputs from the form.
and the form stays invalid, even though it is empty => valid.
I think this happens is because Formsy runs validation only when it has at least one input.
It seems the function
validateForm
in main.js validates only forms that contain at least 1 input.I believe adding
isValid: true,
would fix that:What do u think?
Thanks
The text was updated successfully, but these errors were encountered: