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

Sencha Documentation

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

 

The default error message used when an exclusion validation fails

The default error message used when an exclusion validation fails

 

The default error message used when a format validation fails

The default error message used when a format validation fails

 

The default error message used when an inclusion validation fails

The default error message used when an inclusion validation fails

 

The default error message used when a length validation fails

The default error message used when a length validation fails

 

The default error message used when a presence validation fails

The default error message used when a presence validation fails

Defined By

Methods

 
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

 
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

 
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

 
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

 
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