Class TextBase (namespace Nette\Forms)
Implements the basic functionality common to text input controls.
Object | --Component | --FormControl | --TextBase
Public Method Summary | |
---|---|
TextBase |
addFilter
(callback $filter)
Appends input string filter callback.
|
static string |
filterFloat
(string $s)
Float string cleanup.
|
string |
Returns the special value which is treated as empty string.
|
string |
getValue
()
Returns control's value.
|
void |
notifyRule
(Rule $rule)
|
TextBase |
setEmptyValue
(string $value)
Sets the special value which is treated as empty string.
|
TextBase |
setValue
(string $value)
Sets control's value.
|
static bool |
validateEmail
(TextBase $control)
Email validator: is control's value valid email address?
|
static bool |
validateFloat
(TextBase $control)
Float validator: is a control's value float number?
|
static bool |
validateInteger
(TextBase $control)
Integer validator: is a control's value decimal number?
|
static bool |
validateLength
(TextBase $control, array $range)
Length validator: is control's value length in range?
|
static bool |
validateMaxLength
(TextBase $control, int $length)
Max-length validator: is control's value length in limit?
|
static bool |
validateMinLength
(TextBase $control, int $length)
Min-length validator: has control's value minimal length?
|
static bool |
validateRange
(TextBase $control, array $range)
Rangle validator: is a control's value number in specified range?
|
static bool |
validateRegexp
(TextBase $control, string $regexp)
Regular expression validator: matches control's value regular expression?
|
static bool |
validateUrl
(TextBase $control)
URL validator: is control's value valid URL?
|
Methods Inherited From Component |
---|
__construct(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent(), __clone(), __wakeup() |
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary | ||||
---|---|---|---|---|
protected string | $emptyValue | '' |
line 38 |
|
protected array | $filters | array() |
line 41 |
Method Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 102 addFilterpublic TextBase addFilter (callback $filter) Appends input string filter callback.
|
|||||||||||||||
line 252 filterFloatpublic static string filterFloat (string $s) Float string cleanup.
|
|||||||||||||||
line 90 getEmptyValuepublic string getEmptyValue () Returns the special value which is treated as empty string.
|
|||||||||||||||
line 62 getValuepublic string getValue () Returns control's value.
|
|||||||||||||||
line 115 notifyRulepublic void notifyRule (Rule $rule) Overridden in child classes as:
|
|||||||||||||||
line 78 setEmptyValuepublic TextBase setEmptyValue (string $value) Sets the special value which is treated as empty string.
|
|||||||||||||||
line 50 setValuepublic TextBase setValue (string $value) Sets control's value.
|
|||||||||||||||
line 174 validateEmailpublic static bool validateEmail (TextBase $control) Email validator: is control's value valid email address?
|
|||||||||||||||
line 227 validateFloatpublic static bool validateFloat (TextBase $control) Float validator: is a control's value float number?
|
|||||||||||||||
line 215 validateIntegerpublic static bool validateInteger (TextBase $control) Integer validator: is a control's value decimal number?
|
|||||||||||||||
line 158 validateLengthpublic static bool validateLength (TextBase $control, array $range) Length validator: is control's value length in range?
|
|||||||||||||||
line 145 validateMaxLengthpublic static bool validateMaxLength (TextBase $control, int $length) Max-length validator: is control's value length in limit?
|
|||||||||||||||
line 132 validateMinLengthpublic static bool validateMinLength (TextBase $control, int $length) Min-length validator: has control's value minimal length?
|
|||||||||||||||
line 240 validateRangepublic static bool validateRange (TextBase $control, array $range) Rangle validator: is a control's value number in specified range?
|
|||||||||||||||
line 203 validateRegexppublic static bool validateRegexp (TextBase $control, string $regexp) Regular expression validator: matches control's value regular expression?
|
|||||||||||||||
line 190 validateUrlpublic static bool validateUrl (TextBase $control) URL validator: is control's value valid URL?
|