Open Journal Systems  2.4.4
 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 ()
 setForm (&$form)

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 31 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 45 of file

References FormValidator\getFieldValue(), and FormValidator\isEmptyAndOptional().

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