[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/data/validator/ -> validation.class.php (sommaire)

(pas de description)

Poids: 66 lignes (2 kb)
Inclus ou requis:0 fois
Référencé: 2 fois
Nécessite: 0 fichiers

Définit 1 class

Validation:: (4 méthodes):
  Validation()
  _setError()
  getError()
  validate()


Classe: Validation  - X-Ref

\ingroup Validator

This is the base class that the Rule classes implement. Classes extending this one
can use the private method _setError for raising custom error codes (in addition to
returning 'false' from the validate() method)

Client classes can use the public method getError() to retrieve this error codes
and perhaps show a more meaningful message based on its value (if any)
Validation()   X-Ref
Initialize the validation scheme


_setError($error)   X-Ref
Set a custom error code or message

param: error The new error code

getError()   X-Ref
For client classes, use this method to retrieve the custom error code which was (if any)
that was set in the validate() method.

It is not guaranteed that an unsuccessful result of the validate() method will set a custom
error message, as that is completely up to the Validator class. Also depending on the
class we might get different return values from this method.

return: An extended error message

validate($value)   X-Ref
Implementation of the validation logic

param: value The value that we're going to validate
return: true if successful or false otherwise



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics