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

Class: RequiredRule

Source Location: /framework/validation/rule.inc.php

http://wact.sourceforge.net/index.php/RequiredRule

Class Overview

Rule
   |
   --SingleFieldRule
      |
      --RequiredRule

For fields which must be supplied a value by the user

Methods


Inherited Variables

Inherited Methods

Class: SingleFieldRule

SingleFieldRule::SingleFieldRule()
Constructs Rule
SingleFieldRule::Check()
Check a Single Value to see if its valid
SingleFieldRule::Error()
Signal that an error has occurred.
SingleFieldRule::getField()
Returns the fieldname the rule applies to
SingleFieldRule::IsValid()
Have we already determined this error to be invalid?
SingleFieldRule::validate()
Perform validation

Class: Rule

Rule::setGroup()
Sets the error message group (related to the vars file)
Rule::validate()
Perform validation

Class Details

For fields which must be supplied a value by the user

Class Methods


constructor RequiredRule

Constructs RequiredRule

RequiredRule RequiredRule( string $fieldname)

API Tags:

access:  public

Parameters:

string   $fieldname   fieldname to validate

method validate

Performs validation

boolean validate( DataSource &$DataSource, ErrorList &$ErrorList)

API Tags:

return:  TRUE if validation passed
access:  public
Overrides SingleFieldRule::validate() (Perform validation)

Parameters:

DataSource   &$DataSource  
  • data to validate
ErrorList   &$ErrorList  
WACT: Copyright 2003 Procata, Inc. Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
Documentation generated on Sun, 28 Nov 2004 19:49:35 -0800 by phpDocumentor 1.2.3