Methods summary
public
|
|
public
NTextBase
|
#
setValue( string $value )
Sets control's value.
Parameters
Returns
Overrides
|
public
string
|
#
getValue( )
Returns control's value.
Returns
string
Overrides
|
public
NTextBase
|
#
setEmptyValue( string $value )
Sets the special value which is treated as empty string.
Sets the special value which is treated as empty string.
Parameters
Returns
|
public
string
|
#
getEmptyValue( )
Returns the special value which is treated as empty string.
Returns the special value which is treated as empty string.
Returns
string
|
public
NTextBase
|
#
addFilter( callable $filter )
Appends input string filter callback.
Appends input string filter callback.
Parameters
Returns
|
public
string
|
#
sanitize( $value )
Filter: removes unnecessary whitespace and shortens value to control's max
length.
Filter: removes unnecessary whitespace and shortens value to control's max
length.
Returns
string
|
public
NHtml
|
#
getControl( )
Generates control's HTML element.
Generates control's HTML element.
Returns
Overrides
|
public
NTextBase
|
#
addRule( mixed $operation, string $message = NULL, mixed $arg = NULL )
Adds a validation rule.
Parameters
- $operation
mixed rule type
- $message
string message to display for invalid data
- $arg
mixed optional rule arguments
Returns
Overrides
|
public static
boolean
|
#
validateLength( NTextBase $control, array $range )
Length validator: is control's value length in range?
Length validator: is control's value length in range?
Parameters
- $control
NTextBase
- $range
array min and max length pair
Returns
boolean
|
public static
boolean
|
#
validateEmail( NTextBase $control )
Email validator: is control's value valid email address?
Email validator: is control's value valid email address?
Parameters
Returns
boolean
|
public static
boolean
|
#
validateUrl( NTextBase $control )
URL validator: is control's value valid URL?
URL validator: is control's value valid URL?
Parameters
Returns
boolean
|
public static
|
|
public static
boolean
|
#
validateRange( NTextBase $control, array $range )
Rangle validator: is a control's value number in specified range?
Rangle validator: is a control's value number in specified range?
Parameters
- $control
NTextBase
- $range
array min and max value pair
Returns
boolean
|