Package: | Ext.data |
Defined In: | Validations.js |
Class: | validations |
Extends: | Object |
This singleton contains a set of validation functions that can be used to validate any type of data. They are most often used in Models, where they are automatically set up and executed.
Property | Defined By | |
---|---|---|
exclusionMessage : String The default error message used when an exclusion validation fails | validations | |
formatMessage : Boolean The default error message used when a format validation fails | validations | |
inclusionMessage : String The default error message used when an inclusion validation fails | validations | |
lengthMessage : String The default error message used when a length validation fails | validations | |
presenceMessage : String The default error message used when a presence validation fails | validations |
Method | Defined By | |
---|---|---|
exclusion( Object config , String value )
:
BooleanValidates that the given value is present in the configured list Validates that the given value is present in the configured list Parameters:
| validations | |
format( Object config , String value )
:
BooleanReturns true if the given value passes validation against the configured matcher regex Returns true if the given value passes validation against the configured matcher regex Parameters:
| validations | |
inclusion( String value )
:
BooleanValidates that the given value is present in the configured list Validates that the given value is present in the configured list Parameters:
| validations | |
length( Object config , String value )
:
BooleanReturns true if the given value is between the configured min and max values Returns true if the given value is between the configured min and max values Parameters:
| validations | |
presence( Object config , Mixed value )
:
BooleanValidates that the given value is present Validates that the given value is present Parameters:
| validations |