diff --git a/.gitignore b/.gitignore index 62fb128..2526405 100755 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,13 @@ # Node node_modules +package-lock.json test/results test/coverage +# Compiled +docs/dist/js/*.min.*.js +static/js/*.min.*.js + ## OS X .DS_Store ._* diff --git a/README.md b/README.md index 46f3a4d..6924287 100755 --- a/README.md +++ b/README.md @@ -1,14 +1,20 @@ -# Validate.js [](https://travis-ci.org/cferdinandi/validate) +# Validate.js A lightweight form validation script that augments native HTML5 form validation elements and attributes, providing a better user experience and giving you more control. -When a visitor leaves a field, Validate.js immediately validates the field and displays an error if applicable. It also validates the entire form on submit, and provides support for custom `onSubmit()` functions (for example, Ajax form submission). +When a visitor leaves a field, Validate.js immediately validates the field and displays an error if applicable. It also validates the entire form on submit, and provides support for custom `onSubmit()` functions (for example, Ajax form submission). You can pass an option to activate live validation on fields while the visitor is still typing. It allows for custom errors. -[Download Validate](https://github.com/cferdinandi/validate/archive/master.zip) / [View the demo](http://cferdinandi.github.io/validate/) +Regarding the original script by Chris Ferdinandi: [Download Validate](https://github.com/cferdinandi/validate/archive/master.zip) / [View the demo](http://cferdinandi.github.io/validate/) +[Download this fork of Validate](https://github.com/michapietsch/validate/archive/master.zip) + +This fork builds on v1.1.3 and adds the following features: +- optional live validation while the visitor is still typing (v1.2.0) — see below for how to pass options +- delay live validation for invalid values while still typing, but immediately show positive feedback for valid values ("reward early, punish late") (v1.4.0) +- integration for custom errors by providing a wrapper around the HTML5 Constraint API setCustomValidity() function (v.1.3.0) — see below for an example to use the setCustomError() method