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

Class: HTML_QuickForm_Rule_Compare

Source Location: /main/inc/lib/pear/HTML/QuickForm/Rule/Compare.php

Class Overview

HTML_QuickForm_Rule
   |
   --HTML_QuickForm_Rule_Compare

Rule to compare two form fields


Author(s):

Version:

  • $Revision: 6184 $

Variables

Methods


Child classes:

HTML_QuickForm_Rule_DateCompare
QuickForm rule to compare 2 dates

Inherited Variables

Inherited Methods

Class: HTML_QuickForm_Rule

HTML_QuickForm_Rule::getValidationScript()
Returns the javascript test (the test should return true if the value is INVALID)
HTML_QuickForm_Rule::setName()
Sets the rule name
HTML_QuickForm_Rule::validate()
Validates a value

Class Details

[line 33]
Rule to compare two form fields

The most common usage for this is to ensure that the password confirmation field matches the password field




Tags:

version:  $Revision: 6184 $
access:  public


[ Top ]


Class Variables

$_operators = array(
        'eq'  => '==',
        'neq' => '!=',
        'gt'  => '>',
        'gte' => '>=',
        'lt'  => '<',
        'lte' => '<='
    )

[line 40]

Possible operators to use



Tags:

access:  private

Type:   array


[ Top ]



Class Methods


method getValidationScript [line 84]

void getValidationScript( [ $operator = null])



Overrides HTML_QuickForm_Rule::getValidationScript() (Returns the javascript test (the test should return true if the value is INVALID))

Parameters:

   $operator  

[ Top ]

method validate [line 71]

void validate( $values, [ $operator = null])



Overridden in child classes as:

HTML_QuickForm_Rule_DateCompare::validate()
Validate 2 dates

Overrides HTML_QuickForm_Rule::validate() (Validates a value)

Parameters:

   $values  
   $operator  

[ Top ]

method _findOperator [line 57]

string _findOperator( string $name)

Returns the operator to use for comparing the values



Tags:

return:  operator to use for validation
access:  private


Parameters:

string   $name   operator name

[ Top ]


Documentation generated on Thu, 12 Jun 2008 13:08:37 -0500 by phpDocumentor 1.4.1