Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct (&$form, $field, $message) | |
isValid () | |
Public Member Functions inherited from FormValidator | |
__construct (&$form, $field, $type, $message, $validator=null) | |
getField () | |
getFieldValue () | |
& | getForm () |
getMessage () | |
getType () | |
& | getValidator () |
isEmptyAndOptional () | |
Additional Inherited Members | |
Data Fields inherited from FormValidator | |
$_field | |
$_form | |
$_message | |
$_type | |
$_validator | |
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 FormValidatorBoolean.inc.php.
FormValidatorBoolean::__construct | ( | & | $form, |
$field, | |||
$message | |||
) |
Constructor.
$form | Form the associated form |
$field | string the name of the associated field |
$message | string the error message for validation failures (i18n key) |
Definition at line 27 of file FormValidatorBoolean.inc.php.
FormValidatorBoolean::isValid | ( | ) |
Value is valid if it is empty (false) or has value '1' (true). This assumes checkbox behavior in the form.
Reimplemented from FormValidator.
Definition at line 42 of file FormValidatorBoolean.inc.php.
References FormValidator\getField(), FormValidator\getFieldValue(), and FormValidator\getForm().