TextBase
abstract class TextBase extends BaseControl
Implements the basic functionality common to text input controls.
Properties
string | $emptyValue | ||
protected array | $filters | ||
protected mixed | $rawValue |
Methods
Sets control's value.
Returns control's value.
Sets the special value which is treated as empty string.
Returns the special value which is treated as empty string.
Sets the maximum number of allowed characters.
Generates control's HTML element.
Adds a validation rule.
Float string cleanup.
Details
at line 40
void
setValue($value)
Sets control's value.
at line 56
mixed
getValue()
Returns control's value.
at line 74
TextBase
setEmptyValue($value)
Sets the special value which is treated as empty string.
at line 85
string
getEmptyValue()
Returns the special value which is treated as empty string.
at line 96
TextBase
setMaxLength($length)
Sets the maximum number of allowed characters.
at line 109
TextBase
addFilter($filter)
deprecated
deprecated
Appends input string filter callback.
at line 116
Html|string
getControl()
Generates control's HTML element.
at line 129
BaseControl
addRule($validator, $message = NULL, $arg = NULL)
Adds a validation rule.
at line 149
static bool
validateEmail(TextBase $control)
internal |
Is control's value valid email address?
at line 160
static bool
validateUrl(TextBase $control)
internal |
Is control's value valid URL?
at line 174
static
validateRegexp(TextBase $control, $regexp)
deprecated
deprecated
No description
at line 186
static bool
validatePattern(TextBase $control, $pattern)
internal |
Matches control's value regular expression?
at line 197
static bool
validateInteger(TextBase $control)
internal |
Is a control's value decimal number?
at line 214
static bool
validateFloat(TextBase $control)
internal |
Is a control's value float number?
at line 231
static string
filterFloat($s)
internal |
Float string cleanup.