https://github.com/binaryk/js-validation
This is a javascript easy form validation.
https://github.com/binaryk/js-validation
Last synced: 8 months ago
JSON representation
This is a javascript easy form validation.
- Host: GitHub
- URL: https://github.com/binaryk/js-validation
- Owner: binaryk
- Created: 2016-01-26T10:33:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-26T19:01:26.000Z (over 10 years ago)
- Last Synced: 2025-03-18T20:28:07.356Z (about 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jsValidation
This is a javascript easy form validation.
### I want to develop a big library for javascript form validation.
To use it < very simple >:
1. copy files in your project and inject them into your page
2. create an object for your form:
var validate = new App.Forms.Validate();
3. to add rule (and field) use method "addRule"
validate.addRule('email', {
rule: 'require',
message: 'This field is require'
});
4. before submit form use:
if( validate.validate() ){
myForm.submit();
}
In this case the script will validate your form and show error messages, and it return "false" into "if".
___
This is the first version of library.
I will develop it more but have patience.