Class Index | File Index

Classes


Class M.DateValidator


Extends M.Validator.
Validates a given date. Validates whether it is possible to create a M.Date (then valid) or not (then invalid).
Defined in: date_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, key)
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.DateValidator()
Field Detail
{String} type
The type of this object.
Method Detail
{Boolean} validate(obj, key)
Validation method. First checks if value is not null, undefined or an empty string and then tries to create a M.Date with it. Pushes different validation errors depending on where the validator is used: in the view or in the model.
Parameters:
{Object} obj
Parameter object. Contains the value to be validated, the M.ModelAttribute object of the property and the model record's id.
key
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:30 GMT+0100 (MEZ)