Validaty - A Validation Plugin
Required Files
- jquery.validaty.css
- jquery.validaty.js
- jquery.validaty.validators.js
Options
Property | value | Description |
---|---|---|
errorTarget | undefined | Callback to intercept the errors |
focus | 'first' | Field to be focused when validation fails |
ignore | ':submit' | Fields to be ignored |
onInvalid | undefined | Callback called when some field is invalid |
onMessage | undefined | Callback called when validation message is shown |
onValid | undefined | Callback called when all fields is valid |
validators | {} | Object to hold the validators functions |
Usage
data-validaty
The attribute data-validaty
receives the validation name.
;
data-validaty-ignore
Used to ignore some validation included on data-validaty
.
on
Add the key on:
with the action you want to trigger the validation.
Functions
; // Gives you the internal helpers.; // Gives you a validator.; // Destroy the Validaty's bind.; // Execute the validation over the form or the given selectors.
Validators.js
This file should contain all validators, just includes your validations calling register
.
Property | Description |
---|---|
validation-name | The name of your validation |
validation-message | The message shown when you validation fails return false |
form | The validated form |
word | ??? |