Class Index | File Index

Classes


Class M.NumberValidator


Extends M.Validator.
Validates if passed value is a number. Works with Strings and Numbers. Strings are parsed into numbers and then checked.
Defined in: number_validator.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
The type of this object.
Fields borrowed from class M.Validator:
validationErrors
Method Summary
Method Attributes Method Name and Description
 
validate(obj)
Validation method.
Methods borrowed from class M.Validator:
clearErrorBuffer, customize
Methods borrowed from class M.Object:
bindToCaller, create, destroy, extend, get, include, set
Class Detail
M.NumberValidator()
Field Detail
{String} type
The type of this object.
Method Detail
{Boolean} validate(obj)
Validation method. If value's type is not "number" but a string, the value is parsed into an integer or float and checked versus the string value with '=='. The '==' operator makes an implicit conversion of the value. '===' would return false.
Parameters:
{Object} obj
Parameter object. Contains the value to be validated, the M.ModelAttribute object of the property and the model record's id.
Returns:
{Boolean} Indicating whether validation passed (YES|true) or not (NO|false).

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 08 2010 15:07:32 GMT+0100 (MEZ)