Class FieldSetValidator

Description

the FieldSetValidator takes a FieldSet and a RuleSet and validates values between the two

  • version: $Id: FieldSetValidator.class.php,v 1.5 2007/09/04 20:25:55 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/utilities/FieldSetValidator/FieldSetValidator.class.php (line 17)


	
			
Variable Summary
Method Summary
void FieldSetValidator (object FieldSet $fieldset, object RuleSet $ruleset)
void setFieldSet (object FieldSet $fieldset)
void setRuleSet (object RuleSet $ruleset)
boolean validate (string $key, [optional $throwErrors = true])
boolean validateAll ([optional $throwErrors = true])
Variables
object FieldSet $_fieldset (line 24)

the FieldSet object

  • access: private
object RuleSet $_ruleset (line 32)

the RuleSet object

  • access: private
Methods
Constructor FieldSetValidator (line 42)

the constructor

  • access: public
void FieldSetValidator (object FieldSet $fieldset, object RuleSet $ruleset)
setFieldSet (line 54)

sets the fieldset object to use to $fieldset

  • access: public
void setFieldSet (object FieldSet $fieldset)
setRuleSet (line 65)

sets the ruleset object to use to $ruleset

  • access: public
void setRuleSet (object RuleSet $ruleset)
validate (line 78)

validates the value of $key against the rules defined for it

  • return: if the validation was successful or not
  • access: public
boolean validate (string $key, [optional $throwErrors = true])
  • string $key: the key to validate
  • optional $throwErrors: boolean $throwErrors Should we throw the specified errors if validation fails or just return true/false. Default = TRUE.
validateAll (line 94)

validates all defined keys in the FieldSet against those in the RuleSet

  • return: if the validation was successful or not
  • access: public
boolean validateAll ([optional $throwErrors = true])
  • optional $throwErrors: boolean $throwErrors Should we throw the specified errors if validation fails or just return true/false. Default = TRUE.

Documentation generated on Wed, 19 Sep 2007 10:23:08 -0400 by phpDocumentor 1.3.0RC3