FormLib
[ class tree: FormLib ] [ index: FormLib ] [ all elements ]

Class: RegexValidator

Source Location: /FormLib/RegexValidator.php

Class Overview

Validator
   |
   --RegexValidator

Validates a field using a regular expression.


Author(s):

  • Randy

Version:

  • 0.2

Methods


Child classes:

EmailValidator
Validates a field as an e-mail address using a regular expression.

Inherited Methods

Class: Validator

Validator::errorMessage()
Get an error message that can be shown to the user.
Validator::isValid()
Validates the value the user entered into a field.

Class Details

[line 16]
Validates a field using a regular expression.



Tags:

author:  Randy
version:  0.2


[ Top ]


Class Methods


constructor __construct [line 21]

RegexValidator __construct( $regex, $description)



Tags:

access:  public


Overridden in child classes as:

EmailValidator::__construct()

Parameters:

   $regex  
   $description  

[ Top ]

method errorMessage [line 35]

void errorMessage( $field)



Tags:

access:  public


Overrides Validator::errorMessage() (Get an error message that can be shown to the user.)

Parameters:

   $field  

[ Top ]

method isValid [line 27]

void isValid( &$field)



Tags:

access:  public


Overridden in child classes as:

EmailValidator::isValid()

Overrides Validator::isValid() (Validates the value the user entered into a field.)

Parameters:

   &$field  

[ Top ]


Documentation generated on Wed, 15 Nov 2006 08:48:08 -0600 by phpDocumentor 1.3.1