For up to date documentation and features, visit http://docs.sencha.com/ext-js/4-0

## Sencha Documentation

# Ext.data.validations

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.

Defined By

### Properties

Ext.data.validations
view source
exclusionMessage : String

The default error message used when an exclusion validation fails

The default error message used when an exclusion validation fails

Ext.data.validations
view source
formatMessage : Boolean

The default error message used when a format validation fails

The default error message used when a format validation fails

Ext.data.validations
view source
inclusionMessage : String

The default error message used when an inclusion validation fails

The default error message used when an inclusion validation fails

Ext.data.validations
view source
lengthMessage : String

The default error message used when a length validation fails

The default error message used when a length validation fails

Ext.data.validations
view source
presenceMessage : String

The default error message used when a presence validation fails

The default error message used when a presence validation fails

Defined By

### Methods

Ext.data.validations
view source
exclusion( Object config, String value) : Boolean

Validates that the given value is present in the configured list

Validates that the given value is present in the configured list

### Parameters

- config : Object

  Optional config object

- value : String

  The value to validate

### Returns

- Boolean

  True if the value is not present in the list

Ext.data.validations
view source
format( Object config, String value) : Boolean

Returns 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

- config : Object

  Optional config object

- value : String

  The value to validate

### Returns

- Boolean

  True if the value passes the format validation

Ext.data.validations
view source
inclusion( String value, Object value) : Boolean

Validates that the given value is present in the configured list

Validates that the given value is present in the configured list

### Parameters

- value : String

  The value to validate

- value : Object

### Returns

- Boolean

  True if the value is present in the list

Ext.data.validations
view source
length( Object config, String value) : Boolean

Returns 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

- config : Object

  Optional config object

- value : String

  The value to validate

### Returns

- Boolean

  True if the value passes validation

Ext.data.validations
view source
presence( Object config, Mixed value) : Boolean

Validates that the given value is present

Validates that the given value is present

### Parameters

- config : Object

  Optional config object

- value : Mixed

  The value to validate

### Returns

- Boolean

  True if validation passed