Class Index | File Index

Classes


Class BTM.Form.FieldRules

Basic Form field checker class
Defined in: form.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
BTM.Form.FieldRules(element, rules)
Field Summary
Field Attributes Field Name and Description
 
Common field validation rules Currently defined types are: 'number', 'number-or-space', 'not-number', 'empty', 'empty-or-space', 'not-empty', 'not-empty-or-space', 'alphanumeric', 'alphanumeric-or-space', 'alpha-and-numeric', 'email', 'checked', 'not-checked', 'one-checked', 'all-checked', 'none-checked', 'one-selected', 'none-selected'
Method Summary
Method Attributes Method Name and Description
 
checkRule(rule)
Check an individual Validation rule
 
init(form, rules)
Initialize the FieldRules
 
Read the rules from Form elements
 
Run the validation checks
Class Detail
BTM.Form.FieldRules(element, rules)
Parameters:
{HTMLElement|String} element
element ID or element reference to the form to be validated
{Array} rules Optional
the validation rules to check
Field Detail
commonTypes
Common field validation rules Currently defined types are: 'number', 'number-or-space', 'not-number', 'empty', 'empty-or-space', 'not-empty', 'not-empty-or-space', 'alphanumeric', 'alphanumeric-or-space', 'alpha-and-numeric', 'email', 'checked', 'not-checked', 'one-checked', 'all-checked', 'none-checked', 'one-selected', 'none-selected'
Method Detail
checkRule(rule)
Check an individual Validation rule
Parameters:
rule

init(form, rules)
Initialize the FieldRules
Parameters:
{HTMLElement|String} form
elemend ID or reference to the Form element
{Object[]} rules Optional
Validation rules to be applied

{Array} readRules()
Read the rules from Form elements
Returns:
{Array} the rules collected from the Form elements

runChecks()
Run the validation checks

Documentation generated by JsDoc Toolkit 2.1.0 on Tue Feb 03 2009 04:12:53 GMT+1100 (EST)