new JSValidator(name, formObjectName, rules, config)
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The form id in the page |
formObjectName |
string | the full qualified object name on server side, mandatory for AJAX validation |
rules |
JSValidator.Rule[] | The JSON rule array |
config |
JSON | The Extra config for override default config |
- Source:
Properties:
Name | Type | Description |
---|---|---|
form |
JSValidator.Form | The binding form |
Classes
Members
Methods
-
bindValidationToElement(elementId, eventType, preventDefaultOnFail) → {*}
-
SCOPE ELEMENT API: bind validation to external HTML Element
Parameters:
Name Type Description elementId
String eventType
String Event type (keypress, click, submit, etc.) preventDefaultOnFail
boolean True: Cancel event there has failed rules Returns:
- Type
- *
-
getFields() → {JSValidator.Field[]}
-
Getter for all the form Fields
Returns:
- Type
- JSValidator.Field[]
-
getFieldWithName(fieldName) → {JSValidator.Field}
-
Getter for a Field with name
Parameters:
Name Type Description fieldName
String Returns:
- Type
- JSValidator.Field
-
getForm() → {JSValidator.Form}
-
Getter for the form binded to the current validator
Returns:
- Type
- JSValidator.Form
-
log(msg)
-
Logger for JSValidator, log only if prop debug is set at TRUE
Parameters:
Name Type Description msg
String Message