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
Expected: When clicking Submit, the form should not submit, an error message for some_input should be shown.
Actual: When clicking Submit, the error message quickly flashes, but then the form is submitted.
This only occurs when no change events have been fired on the form. For example, typing anything in the input, or even focusing the input, would cause a change event to fire, and from there on validation works as expected.
This issue would happen, for example, when clicking "Login" on a form without attempting to fill the form. It should not call onSubmit since it failed validation.
The text was updated successfully, but these errors were encountered:
Recall, we're still in <Submit/>'s onClick event, the same one that called setState. This is not allowed in React. Reading from this.state is only reliable in render().
We plan to remove validations in Frig 1.0 so that users have finer grained control over their validations. Right now, users cannot opt out of field-level onChange validation without opting out of validation altogether.
Consider the following Frig form:
Expected: When clicking Submit, the form should not submit, an error message for
some_input
should be shown.Actual: When clicking Submit, the error message quickly flashes, but then the form is submitted.
This only occurs when no change events have been fired on the form. For example, typing anything in the input, or even focusing the input, would cause a change event to fire, and from there on validation works as expected.
This issue would happen, for example, when clicking "Login" on a form without attempting to fill the form. It should not call
onSubmit
since it failed validation.The text was updated successfully, but these errors were encountered: