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
|
#
validateMinLength( NTextBase $control, integer $length )
Min-length validator: has control's value minimal length?
Min-length validator: has control's value minimal length?
Parameters
Returns
boolean
|
public static
boolean
|
#
validateMaxLength( NTextBase $control, integer $length )
Max-length validator: is control's value length in limit?
Max-length validator: is control's value length in limit?
Parameters
Returns
boolean
|
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
|
#
validatePattern( NTextBase $control, $pattern )
Matches control's value regular expression?
Matches control's value regular expression?
Returns
boolean
|
public static
boolean
|
#
validateInteger( NTextBase $control )
Is a control's value decimal number?
Is a control's value decimal number?
Returns
boolean
|
public static
boolean
|
#
validateFloat( NTextBase $control )
Is a control's value float number?
Is a control's value float number?
Returns
boolean
|
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
|
public static
string
|
#
filterFloat( string $s )
Float string cleanup.
Parameters
Returns
string
|