class
SAPO.Ink.FormValidator
Utility class to validate forms
Defined in
Ink/FormValidator/0.1/lib.js
Function Summary
reset()
reset previously generated validation errors
Check if a form is valid or not
Function Details
function reset
reset()
reset previously generated validation errors
function validate
Boolean
validate(DOMElement|String
elm, Object
options)
Check if a form is valid or not
Parameters:
elm
- DOM form element or form id
options
Options for -
[ Function onSuccess ]
- function to run when form is valid -
[ Function onError ]
- function to run when form is not valid -
[ Array customFlag ]
- custom flags to use to validate form fields
Returns:
true or false if the form is valid or not