Class M.NotMinusValidator
Extends
M.Validator.
Validates if it represents a minus number. Works with numbers and strings containing just a number.
Defined in: not_minus_validator.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
The type of this object.
|
- Fields borrowed from class M.Validator:
- validationErrors
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
Field Detail
{String}
type
The type of this object.
Method Detail
{Boolean}
validate(obj)
Validation method. Distinguishes between type of value: number or string. Both possible. If number value is checked if less than zero,
if string value is checked if ^prefixed with a minus sign ( - ).
- 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).