TextBase
abstract class TextBase extends BaseControl
Implements the basic functionality common to text input controls.
Properties
protected | $emptyValue | ||
protected | $rawValue |
Methods
Returns control's value.
Sets whether getValue() returns null instead of empty string.
No description
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.
No description
Adds a validation rule.
Details
at line 32
Control
setValue(mixed $value)
internal |
Sets control's value.
at line 50
mixed
getValue()
Returns control's value.
at line 62
TextBase
setNullable(bool $value = true)
Sets whether getValue() returns null instead of empty string.
at line 69
bool
isNullable()
No description
at line 78
TextBase
setEmptyValue(string $value)
Sets the special value which is treated as empty string.
at line 88
string
getEmptyValue()
Returns the special value which is treated as empty string.
at line 97
TextBase
setMaxLength(int $length)
Sets the maximum number of allowed characters.
at line 104
Html|string
getControl()
Generates control's HTML element.
at line 119
protected string|null
getRenderedValue()
No description
at line 127
BaseControl
addRule(callable|string $validator, string|Stringable|null $errorMessage = null, mixed $arg = null)
Adds a validation rule.