Adds support for the formnovalidate attribute to skip validation on back buttons in multi-page forms. #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When you have a multi-page form, and a user is on page 2 that has some required fields, we don't want them to proceed without completing valid input, but we should allow them to go back to page 1.
There's an HTML 5 attribute for this, formnovalidate, that can be added to submit buttons indicating that they shouldn't trigger validation. Adding support for this was a request in the original repository for this library (see here).
I've added a check in this PR to see if that attribute exists in the element that triggered the form submission, and if found, to not validate.
Also made small changes to the readme and build command, that looked to be necessary to build the project.