Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
FormValidatorInSet Class Reference
Inheritance diagram for FormValidatorInSet:

Public Member Functions

 FormValidatorInSet (&$form, $field, $type, $message, $acceptedValues)
 isValid ()
- Public Member Functions inherited from FormValidator
 FormValidator (&$form, $field, $type, $message, $validator=null)
 getField ()
 getFieldValue ()
getForm ()
 getMessage ()
 getType ()
getValidator ()
 isEmptyAndOptional ()
 isValid ()

Public Attributes

- Public Attributes inherited from FormValidator

Detailed Description

Form validation check that checks if value is within a certain set.

Definition at line 18 of file

Member Function Documentation

FormValidatorInSet::FormValidatorInSet ( $form,


$formForm the associated form
$fieldstring the name of the associated field
$typestring the type of check, either "required" or "optional"
$messagestring the error message for validation failures (i18n key)
$acceptedValuesarray all possible accepted values

Definition at line 34 of file

FormValidatorInSet::isValid ( )

Value is valid if it is empty and optional or is in the set of accepted values.

See Also

Definition at line 48 of file

Member Data Documentation

array FormValidatorInSet::$_acceptedValues

of all values accepted as valid

Definition at line 24 of file

The documentation for this class was generated from the following file: