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

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

 $_acceptedValues
 
- Public Attributes inherited from FormValidator
 $_field
 
 $_form
 
 $_message
 
 $_type
 
 $_validator
 

Detailed Description

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

Definition at line 18 of file FormValidatorInSet.inc.php.

Member Function Documentation

FormValidatorInSet::FormValidatorInSet ( $form,
  $field,
  $type,
  $message,
  $acceptedValues 
)

Constructor.

Parameters
$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.inc.php.

FormValidatorInSet::isValid ( )

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

See Also
FormValidator::isValid()
Returns
boolean

Definition at line 48 of file FormValidatorInSet.inc.php.

Member Data Documentation

array FormValidatorInSet::$_acceptedValues

of all values accepted as valid

Definition at line 24 of file FormValidatorInSet.inc.php.


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