We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dirty is computed like this:
const dirty = !isEqual(this.initialValues, this.state.values);
Because of this and the decision to not allow not dirty forms to be submit, if a form isn't modified, it can't be submit.
Don't modify a form and attempt to submit it.
An unmodified form should be able to be submit.
A flag to allow this possibility or removal of the restriction.
Imagine a form with a single checkbox. The user should be able to submit this without modification.
CodeSandbox Link:
The text was updated successfully, but these errors were encountered:
const dirty = !isEqual(this.initialValues, this.state.values); is the definition of the dirty state.
But submitting a form without being dirty and touched is possible. There is no check for the dirty before an internal submit execution.
In version 0.11.11 you can also pass isInitialValid to tell formik the form is valid.
0.11.11
isInitialValid
Sorry, something went wrong.
@Saifadin is correct. Form is always submitted when there are no errors.
No branches or pull requests
Current Behavior
Dirty is computed like this:
const dirty = !isEqual(this.initialValues, this.state.values);
Because of this and the decision to not allow not dirty forms to be submit, if a form isn't modified, it can't be submit.
Steps to Reproduce
Don't modify a form and attempt to submit it.
Expected behavior
An unmodified form should be able to be submit.
Suggested solution(s)
A flag to allow this possibility or removal of the restriction.
Additional context
Imagine a form with a single checkbox. The user should be able to submit this without modification.
CodeSandbox Link:
The text was updated successfully, but these errors were encountered: