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

Public Member Functions

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

Additional Inherited Members

- Public Attributes inherited from FormValidator

Detailed Description

Form validation check that checks if the value can be interpreted as a boolean value. An empty field is considered 'false', a value of '1' is considered 'true'.

Definition at line 20 of file

Member Function Documentation

FormValidatorBoolean::FormValidatorBoolean ( $form,


$formForm the associated form
$fieldstring the name of the associated field
$messagestring the error message for validation failures (i18n key)

Definition at line 27 of file

FormValidatorBoolean::isValid ( )

Value is valid if it is empty (false) or has value '1' (true). This assumes checkbox behavior in the form.

See Also

Definition at line 42 of file

References FormValidator\getField(), FormValidator\getFieldValue(), and FormValidator\getForm().

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