Class \Prado\Web\UI\WebControls\TDataTypeValidator
TDataTypeValidator class
TDataTypeValidator verifies if the input data is of the type specified by \Prado\Web\UI\WebControls\setDataType. The following data types are supported:
- Integer A 32-bit signed integer data type.
- Float A double-precision floating point number data type.
- Date A date data type.
- String A string data type. For Date type, the property \Prado\Web\UI\WebControls\setDateFormat will be used to determine how to parse the date string. If it is not provided, the string will be assumed to be in GNU datetime format.
Class hierarchy
- \Prado\Web\UI\WebControls\TDataTypeValidator
- \Prado\Web\UI\WebControls\TBaseValidator implements IValidator
- \Prado\Web\UI\WebControls\TLabel implements IDataRenderer
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
evaluateIsValid() : bool
This method overrides the parent's implementation.
The validation succeeds if the input data is of valid type. The validation always succeeds if ControlToValidate is not specified or the input data is empty. |
public
|
|
public
|
|
public
|
setDataType(TValidationDataType $value) : mixed
Sets the data type that the values being compared are converted to before the comparison is made.
|
public
|
|
protected
|
evaluateDataTypeCheck(string $value) : bool
Determine if the given value is of a particular type using RegExp.
|
protected
|
getClientClassName() : string
Gets the name of the javascript class responsible for performing validation for this control.
This method overrides the parent implementation. |
protected
|
getClientScriptOptions() : array<string|int, mixed>
Returns an array of javascript validator options.
|