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,
});
}
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