[ 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/ -> TRangeValidator.php (sommaire)

TRangeValidator class file

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TRangeValidator.php 1397 2006-09-07 07:55:53Z wei $
Poids: 331 lignes (10 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 2 classes

TRangeValidator:: (18 méthodes):
  getClientClassName()
  getMinValue()
  setMinValue()
  getMaxValue()
  setMaxValue()
  getDataType()
  setDataType()
  setDateFormat()
  getDateFormat()
  setCharset()
  getCharset()
  evaluateIsValid()
  isValidInteger()
  isValidFloat()
  isValidDate()
  isValidString()
  isValidStringLength()
  getClientScriptOptions()

TRangeValidationDataType:: (0 méthodes):


Classe: TRangeValidator  - X-Ref

TRangeValidator class

TRangeValidator tests whether an input value is within a specified range.

TRangeValidator uses three key properties to perform its validation.
The {@link setMinValue MinValue} and {@link setMaxValue MaxValue}
properties specify the minimum and maximum values of the valid range.
The {@link setDataType DataType} property is used to specify the
data type of the value and the minimum and maximum range values.
These values are converted to this data type before the validation
operation is performed. The following value 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. The date format can be specified by
setting {@link setDateFormat DateFormat} property, which must be recognizable
by {@link TSimpleDateFormatter}. If the property is not set,
the GNU date syntax is assumed.
- <b>String</b> A string data type.
- <b>StringLength</b> check for string length.

The TRangeValidator allows a special DataType "StringLength" that
can be used to verify minimum and maximum string length. The
{@link setCharset Charset} property can be used to force a particular
charset for comparison. Otherwise, the application charset is used and is
defaulted as UTF-8.

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

getMinValue()   X-Ref

return: string the minimum value of the validation range.

setMinValue($value)   X-Ref
Sets the minimum value of the validation range.

param: string the minimum value

getMaxValue()   X-Ref

return: string the maximum value of the validation range.

setMaxValue($value)   X-Ref
Sets the maximum value of the validation range.

param: string the maximum value

getDataType()   X-Ref

return: TRangeValidationDataType the data type that the values being compared are

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

param: TRangeValidationDataType 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

setCharset($value)   X-Ref

param: string charset for string length comparison.

getCharset()   X-Ref

return: string charset for string length comparison.

evaluateIsValid()   X-Ref
This method overrides the parent's implementation.
The validation succeeds if the input data is within the range.
The validation always succeeds if the input data is empty.

return: boolean whether the validation succeeds

isValidInteger($value)   X-Ref
Determine if the value is within the integer range.

param: string value to validate true
return: boolean true if within integer range.

isValidFloat($value)   X-Ref
Determine if the value is within the specified float range.

param: string value to validate
return: boolean true if within range.

isValidDate($value)   X-Ref
Determine if the date is within the specified range.
Uses pradoParseDate and strtotime to get the date from string.

param: string date as string to validate
return: boolean true if within range.

isValidString($value)   X-Ref
Compare the string with a minimum and a maxiumum value.
Uses strcmp for comparision.

param: string value to compare with.
return: boolean true if the string is within range.

isValidStringLength($value)   X-Ref

param: string string for comparision
return: boolean true if min and max string length are satisfied.

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

return: array javascript validator options.

Classe: TRangeValidationDataType  - X-Ref

TRangeValidationDataType class.
TRangeValidationDataType defines the enumerable type for the possible data types that
a range validator can validate upon.

The following enumerable values are defined:
- Integer
- Float
- Date
- String
- StringLength



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