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

Class: CompareFieldsValidator

Source Location: /FormLib/CompareFieldsValidator.php

Class Overview

Validator
   |
   --CompareFieldsValidator

This validator can compare the values of 2 fields. The values can be compare using the standard comparison operators (<, <=, ==, !=, etc...)


Author(s):

  • Randy

Version:

  • 0.2

Methods


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 20]
This validator can compare the values of 2 fields. The values can be compare using the standard comparison operators (<, <=, ==, !=, etc...)



Tags:

author:  Randy
version:  0.2


[ Top ]


Class Methods


constructor __construct [line 32]

CompareFieldsValidator __construct( Field $fieldToCompare, [string $operation = "=="])

Constructor for CompareFieldsValidator objects.



Tags:

access:  public


Parameters:

Field   $fieldToCompare   Reference to the other field to be compared.
string   $operation   The type of comparision to perform. Must be one of:
  • ,
  • <=
  • ==
  • !=
  • >=
  • >

[ Top ]

method errorMessage [line 76]

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 55]

void isValid( &$field)



Tags:

access:  public


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

Parameters:

   &$field  

[ Top ]


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