├── .github ├── CONTRIBUTING.md └── ISSUE_TEMPLATE.md ├── .gitignore ├── .travis.yml ├── LICENSE.md ├── README.md ├── dist ├── validate.js ├── validate.min.js ├── validate.polyfills.js └── validate.polyfills.min.js ├── docs ├── dist │ ├── validate.js │ ├── validate.min.js │ ├── validate.polyfills.js │ └── validate.polyfills.min.js └── index.html ├── gulpfile.js ├── package-lock.json ├── package.json ├── src ├── docs │ ├── _templates │ │ ├── _footer.html │ │ └── _header.html │ └── index.md └── js │ ├── _validityState.polyfill.js │ └── validate.js └── static └── js ├── validate.js ├── validate.min.js ├── validityState-polyfill.js └── validityState-polyfill.min.js /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Bugs, Questions, and Feature Requests 2 | 3 | Report bugs, ask questions, and request features using [GitHub Issues](https://github.com/cferdinandi/smooth-scroll/issues). 4 | 5 | **Before posting, do a search to make sure your issue or question hasn't already been reported or discussed.** If no matching issue exists, go ahead and create one. 6 | 7 | **Please be sure to include all of the following:** 8 | 9 | 1. A clear, descriptive title (ie. "A bug" is not a good title). 10 | 2. [A reduced test case.](https://css-tricks.com/reduced-test-cases/) 11 | - Clearly demonstrate the bug or issue. 12 | - Include the bare minimum HTML, CSS, and JavaScript required to demonstrate the bug. 13 | - A link to your production site is **not** a reduced test case. 14 | - You can create one by [forking this JSFiddle](https://jsfiddle.net/cferdinandi/yhqepa3x/). 15 | 3. The browser and OS that you're using. 16 | 17 | Duplicates and issues without a reduced test case may be closed without comment. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **Test case:** https://jsfiddle.net/cferdinandi/yhqepa3x/ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Node 2 | node_modules 3 | test/results 4 | test/coverage 5 | 6 | ## OS X 7 | .DS_Store 8 | ._* 9 | .Spotlight-V100 10 | .Trashes -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "7" 4 | before_script: 5 | - npm install -g gulp 6 | script: gulp -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | Copyright (c) Go Make Things, LLC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Validate.js [](https://travis-ci.org/cferdinandi/validate) 2 | A lightweight form validation script that augments native HTML5 form validation elements and attributes, providing a better user experience and giving you more control. 3 | 4 | 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). 5 | 6 | [View the demo](http://cferdinandi.github.io/validate/) 7 | 8 | ## Deprecation Notice 9 | 10 | This plugin has been deprecated and replaced with [Bouncer](https://github.com/cferdinandi/bouncer), which uses the came conventions but has better under-the-hood engineering. 11 | 12 | Validate.js attempted to use the Constraint Validation API to validate fields. The API is buggy at best, and smoothing it across browsers became an increasingly difficult task. As a result, I wrote an entirely new plugin from the ground-up. 13 | 14 | Because this plugin was featured in [my CSS Tricks series](https://css-tricks.com/form-validation-part-1-constraint-validation-html/), I'm leaving it up in read only mode for archival purposes. 15 | 16 | It will no longer be maintained or updated. 17 | 18 | 19 |