Property | Type | Description | |
---|---|---|---|
$_maxlength | |||
$_regex | |||
$_size |
Method | Description | |
---|---|---|
about ( ) | Return info about field type. | |
getMaxLength ( ) | ||
getSize ( ) | ||
init ( string $regex = '', integer $size = 40, integer $maxlength = null ) | The initialisation function for the text variable type. | |
isValid ( &$var, &$vars, $value, &$message ) |
public init ( string $regex = '', integer $size = 40, integer $maxlength = null ) | ||
$regex | string | Any valid PHP PCRE pattern syntax that needs to be matched for the field to be considered valid. If left empty validity will be checked only for required fields whether they are empty or not. If using this regex test it is advisable to enter a description for this field to warn the user what is expected, as the generated error message is quite generic and will not give any indication where the regex failed. |
$size | integer | The size of the input field. |
$maxlength | integer | The max number of characters. |