Class Validations

Index

Properties

Methods

Properties

public static emailMessage: string

[Property] (String)

public static emailRe: RegExp

[Property] (RegExp)

public static exclusionMessage: string

[Property] (String)

public static formatMessage: boolean

[Property] (Boolean)

public static inclusionMessage: string

[Property] (String)

public static lengthMessage: string

[Property] (String)

public static presenceMessage: string

[Property] (String)

public static self: IClass

[Property] (Ext.Class)

Methods

public static callOverridden(args?: any): any

[Method] Call the original method that was previously overridden with override This method is deprecated as callParent does

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)

Returns

any

Object Returns the result of calling the overridden method

public static callParent(args?: any): any

[Method] Call the parent method of the current method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)

Returns

any

Object Returns the result of calling the parent method

public static callSuper(args?: any): any

[Method] This method is used by an override to call the superclass method but bypass any overridden method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)

Returns

any

Object Returns the result of calling the superclass method

public static destroy()

[Method]

public static email(config?: any, email?: string): boolean

[Method] Validates that an email string is in the correct format

Parameters

  • config?: any optional

    Object Config object.

  • email?: string optional

    String The email address.

Returns

boolean

Boolean true if the value passes validation.

public static exclusion(config?: any, value?: string): boolean

[Method] Validates that the given value is present in the configured list

Parameters

  • config?: any optional

    Object Config object.

  • value?: string optional

    String The value to validate.

Returns

boolean

Boolean true if the value is not present in the list.

public static format(config?: any, value?: string): boolean

[Method] Returns true if the given value passes validation against the configured matcher regex

Parameters

  • config?: any optional

    Object Config object.

  • value?: string optional

    String The value to validate.

Returns

boolean

Boolean true if the value passes the format validation.

public static getInitialConfig(name?: string): any

[Method] Returns the initial configuration passed to constructor

Parameters

  • name?: string optional

    String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.

Returns

any

Object/Mixed

public static getMessage(type?: string): any

[Method] Returns the configured error message for any of the validation types

Parameters

  • type?: string optional

    String The type of validation you want to get the error message for.

Returns

any

Object

public static inclusion(config?: any, value?: string): boolean

[Method] Validates that the given value is present in the configured list

Parameters

  • config?: any optional

    Object Config object.

  • value?: string optional

    String The value to validate.

Returns

boolean

Boolean true if the value is present in the list.

public static initConfig(instanceConfig?: any): any

[Method] Initialize configuration for this class

Parameters

  • instanceConfig?: any optional

    Object

Returns

any

Object mixins The mixin prototypes as key - value pairs

public static length(config?: any, value?: string): boolean

[Method] Returns true if the given value is between the configured min and max values

Parameters

  • config?: any optional

    Object Config object.

  • value?: string optional

    String The value to validate.

Returns

boolean

Boolean true if the value passes validation.

public static presence(config?: any, value?: any): boolean

[Method] Validates that the given value is present

Parameters

  • config?: any optional

    Object Config object.

  • value?: any optional

    Object The value to validate.

Returns

boolean

Boolean true if validation passed.

public static statics(): IClass

[Method] Get the reference to the class from which this object was instantiated

Returns

IClass

Ext.Class