[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/UI/WebControls/ -> TDataTypeValidator.php (sommaire)

TDataTypeValidator class.

Author: Wei Zhuo
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TDataTypeValidator.php 1397 2006-09-07 07:55:53Z wei $
Poids: 142 lignes (4 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

TDataTypeValidator:: (8 méthodes):
  getClientClassName()
  getDataType()
  setDataType()
  setDateFormat()
  getDateFormat()
  evaluateDataTypeCheck()
  getClientScriptOptions()
  evaluateIsValid()


Classe: TDataTypeValidator  - X-Ref

TDataTypeValidator class

TDataTypeValidator verifies if the input data is of the type specified
by {@link setDataType DataType}.
The following data types are supported:
- <b>Integer</b> A 32-bit signed integer data type.
- <b>Float</b> A double-precision floating point number data type.
- <b>Date</b> A date data type.
- <b>String</b> A string data type.
For <b>Date</b> 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.

getClientClassName()   X-Ref
Gets the name of the javascript class responsible for performing validation for this control.
This method overrides the parent implementation.

return: string the javascript class name

getDataType()   X-Ref

return: TValidationDataType the data type that the values being compared are converted to before the comparison is made. Defaults to TValidationDataType::String.

setDataType($value)   X-Ref
Sets the data type that the values being compared are converted to before the comparison is made.

param: TValidationDataType the data type

setDateFormat($value)   X-Ref
Sets the date format for a date validation

param: string the date format value

getDateFormat()   X-Ref

return: string the date validation date format if any

evaluateDataTypeCheck($value)   X-Ref
Determine if the given value is of a particular type using RegExp.

param: string value to check
return: boolean true if value fits the type expression.

getClientScriptOptions()   X-Ref
Returns an array of javascript validator options.

return: array javascript validator options.

evaluateIsValid()   X-Ref
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.

return: boolean whether the validation succeeds



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7