TDataTypeValidator verifies if the input data is of the type specified by {@link setDataType DataType}. 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 {@link setDateFormat DateFormat} 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.
С версии: 3.0
Наследование: extends TBaseValidator
Пример #1
0
 protected function createTypeValidator($container, $column, $record)
 {
     $val = new TDataTypeValidator();
     $val->setControlCssClass('required-input2');
     $val->setCssClass('required');
     $val->setControlToValidate(self::DEFAULT_ID);
     $val->setValidationGroup($this->getParent()->getValidationGroup());
     $val->setDisplay(TValidatorDisplayStyle::Dynamic);
     $container->Controls[] = $val;
     return $val;
 }