AnewtValidator Class Reference

Base class for validators. More...

List of all members.

Public Member Functions

 __construct ()
 Create a new validator instance.
 is_valid ($value)
 Checks for validity.


Detailed Description

Base class for validators.

This class does nothing by default. Real validator implementations should subclass this class and implement at least the is_valid() method.

Definition at line 19 of file validator/base.lib.php.


Constructor & Destructor Documentation

AnewtValidator::__construct (  ) 

Create a new validator instance.

This method can be overridden in subclasses, e.g. to handle some values that influence the validator's behaviour.

Make sure to call the parent constructor from your custom contructor!

Reimplemented in AnewtValidatorEmail.

Definition at line 29 of file validator/base.lib.php.


Member Function Documentation

AnewtValidator::is_valid ( value  )  [abstract]

Checks for validity.

The return value should be true for valid values, and false otherwise.

Parameters:
$value The value to check for validity.
Returns:
True if the value is valid, false otherwise.

Reimplemented in AnewtValidatorDate, AnewtValidatorInteger, AnewtValidatorFloat, AnewtValidatorLength, AnewtValidatorPreg, and AnewtValidatorRepeat.


The documentation for this class was generated from the following file:

Generated on Sun Aug 2 22:54:38 2009 for Anewt by  doxygen 1.5.9