Property | Type | Description | |
---|---|---|---|
$aliases | custom aliases to use. Should be configured as maskAlias => settings, where - maskAlias is a string containing a text to identify your mask alias definition (e.g. 'phone') and - settings is an array containing settings for the mask symbol, exactly similar to parameters as passed in [[clientOptions]]. | ||
$clientOptions | the JQuery plugin options for the input mask plugin. | ||
$definitions | custom mask definitions to use. Should be configured as maskSymbol => settings, where - maskSymbol is a string, containing a character to identify your mask definition and - settings is an array, consisting of the following entries: - validator: string, a JS regular expression or a JS function. - cardinality: int, specifies how many characters are represented and validated for the definition. - prevalidator: array, validate the characters before the definition cardinality is reached. - definitionSymbol: string, allows shifting values from other definitions, with this definitionSymbol. | ||
$mask | the input mask (e.g. '99/99/9999' for date input). The following characters can be used in the mask and are predefined: - a: represents an alpha character (A-Z, a-z) - 9: represents a numeric character (0-9) - *: represents an alphanumeric character (A-Z, a-z, 0-9) - [ and ]: anything entered between the square brackets is considered optional user input. This is based on the optionalmarker setting in [[clientOptions]]. Additional definitions can be set through the [[definitions]] property. | ||
$options | the HTML attributes for the input tag. | ||
$type | the type of the input tag. Currently only 'text' and 'tel' are supported. |
Property | Type | Description | |
---|---|---|---|
$_hashVar | the hashed variable to store the pluginOptions |
Method | Description | |
---|---|---|
init ( ) | Initializes the widget. | |
registerClientScript ( ) | Registers the needed client script and options. | |
run ( ) |
Method | Description | |
---|---|---|
hashPluginOptions ( |
Generates a hashed variable to store the plugin clientOptions. Helps in reusing the variable for similar options passed for other widgets on the same page. The following special data attribute will also be added to the input field to allow accessing the client options via javascript: | |
initClientOptions ( ) | Initializes client options |
protected hashPluginOptions ( |
||
$view | the view instance |
public registerClientScript ( ) |
public $aliases |
public $clientOptions |
public $definitions |
public $mask |