Added validation when submitting an h5Validate enabled form #37

Merged
merged 1 commit into from Sep 19, 2012

Conversation

Projects
None yet
3 participants
Contributor

joelpurra commented May 12, 2012

Imitates/emulates the native browser form submit validation procedure of Google Chrome, using h5Validate.

  • Prevents the form from submitting if any invalid fields exists.
  • Validates all form fields.
  • Moves focus to the first invalid field.

The first feature needs to be enabled for the other two (optional) features to execute. All three are enabled by default, see documentation and options. Included a bunch of tests; please execute them to confirm the functionality.

Contributor

joelpurra commented May 12, 2012

This feature should be in line with this comment on issue#5 from @dilvie.

The plan now is to block submit by default, just as a native browser implementation would probably do, until all inputs validate on the form.

HTML5 validation is most useful because it stops the user from submitting the form. I consider this a very important feature.

ericelliott pushed a commit that referenced this pull request Sep 19, 2012

Merge pull request #37 from joelpurra/validate-on-submit
Added validation when submitting an h5Validate enabled form

@ericelliott ericelliott merged commit b81e6ff into ericelliott:master Sep 19, 2012

ericelliott pushed a commit that referenced this pull request Sep 19, 2012

Revert "Merge pull request #37 from joelpurra/validate-on-submit"
This reverts commit b81e6ff, reversing
changes made to ecd8559.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment