Functions
jsValidator.Validator.init() : static
Initializes the validator
jsValidator.Validator.addValidator(Object elmt) : static
Add a validator to a field, checks if the field is correct and calls the message functions
| Object | elmt |
jsValidator.Validator.addValidators(Object elem) : static
Add more than one validators to a field.
| Object | elem |
jsValidator.Validator.inlineMsg(Object target, Object string) : static
Build the message and calls the function to show the message
| Object | target | |
| Object | string |
jsValidator.Validator.showMsg(Object elmt, String elem) : static
You can override this function with your own function This function shows the message
| Object | elmt | : an instance of the message element |
| String | elem | : the fieldname |
jsValidator.Validator.hideMsg(Object elmt, String elem) : static
This method hides the elemnt
| Object | elmt | : an instance of the message element |
| String | elem | : the fieldname |
Validators.regex(Object value, Object regex) : static
Validators.regex This method handles a custom regular expression
| Object | value | |
| Object | regex |
Validators.IsString(Object string) : static
Validators.IsString() Any string that doesn't have control characters (ASCII 0 - 31) but spaces are allowed
| Object | string | value: The string to check |
Validators._IsString(Object string) : static
Validators._IsString() Public: same as IsString, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsAlpha(Object string) : static
Validators.IsAlpha() Public: only letters a-z and A-Z
| Object | string | value |
Validators._IsAlpha(Object string) : static
Validators._IsAlpha() Public: same as IsAlpha, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsDigit(Object string) : static
Validators.IsDigit() Public: only numbers 0-9
| Object | string | value |
Validators._IsDigit(Object string) : static
Validators._IsDigit() Public: same as IsDigit, only now the value is also valid if it is empty
| Object | string | $value |
Validators.IsAlphaNum(Object string) : static
Validators.IsAlphaNum() Public: letters and numbers
| Object | string | value |
Validators._IsAlphaNum(Object string) : static
Validators._IsAlphaNum() Public: same as IsAlphaNum, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsFloat(Object string) : static
Validators.IsFloat() Public: only numbers 0-9 and an optional - (minus) sign (in the beginning only)
| Object | string | value |
Validators._IsFloat(Object string) : static
Validators._IsFloat() Public: same as IsFloat, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsInteger(Object string) : static
Validators.IsInteger() Public: only numbers 0-9 and an optional - (minus) sign (in the beginning only)
| Object | string | $value |
Validators._IsInteger(Object string) : static
Validators._IsInteger() Public: same as IsInteger, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsFilename(Object string) : static
Validators.IsFilename() Public: a valid file name (including dots but no slashes and other forbidden characters)
| Object | string | value |
Validators._IsFilename(Object string) : static
Validators._IsFilename() Public: same as IsFilename, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsBool(Object string) : static
Validators.IsBool() Public: a boolean (case-insensitive "true"/"1" or "false"/"0")
| Object | string | value |
Validators._IsBool(Object string) : static
Validators._IsBool() Public: same as IsBool, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsVariabele(String value) : static
a valid variable name (letters, digits, underscore)
| String | value |
Validators._IsVariabele(Object string) : static
same as IsVariabele, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsPassword(String value) : static
a valid password (alphanumberic + some other characters but no spaces. Only allow ASCII 33 - 126)
| String | value |
Validators._IsPassword(Object string) : static
same as IsVariabele, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsURL(String value) : static
check for a valid url
| String | value |
Validators._IsURL(Object string) : static
same as IsURL, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsEmail(String value) : static
a valid email address (only checks for valid format: xxx@xxx.xxx)
| String | value |
Validators._IsEmail(Object string) : static
same as IsEmail, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsText(String value) : static
like IsString, but newline characters and tabs are allowed
| String | value |
Validators._IsText(Object string) : static
same as IsText, only now the value is also valid if it is empty
| Object | string | value |
Validators.NoHTML(String value) : static
Check if the value does not contain any HTML
| String | value |
Validators._NoHTML(Object string) : static
same as NoHTML, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsPostcode(String value) : static
is a valid dutch postcode (eg. 9999 AA)
| String | value |
Validators._IsPostcode(Object string) : static
same as IsPostcode, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsPhone(String value) : static
is a valid dutch phone-number
| String | value |
Validators._IsPhone(Object string) : static
same as IsPhone, only now the value is also valid if it is empty
| Object | string | value |
Validators.IsIp(String value) : static
check if it's a valid ip adres
| String | value |
Validators._IsIp(Object string) : static
same as IsIp, only now the value is also valid if it is empty
| Object | string | value |