Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct (&$form, $field, $type, $message, $acceptedValues) | |
isValid () | |
Public Member Functions inherited from FormValidator | |
getField () | |
getFieldValue () | |
& | getForm () |
getMessage () | |
getType () | |
& | getValidator () |
isEmptyAndOptional () | |
Data Fields | |
$_acceptedValues | |
Data Fields inherited from FormValidator | |
$_field | |
$_form | |
$_message | |
$_type | |
$_validator | |
Form validation check that checks if value is within a certain set.
Definition at line 18 of file FormValidatorInSet.inc.php.
FormValidatorInSet::__construct | ( | & | $form, |
$field, | |||
$type, | |||
$message, | |||
$acceptedValues | |||
) |
Constructor.
$form | Form the associated form |
$field | string the name of the associated field |
$type | string the type of check, either "required" or "optional" |
$message | string the error message for validation failures (i18n key) |
$acceptedValues | array all possible accepted values |
Reimplemented from FormValidator.
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.
Reimplemented from FormValidator.
Definition at line 48 of file FormValidatorInSet.inc.php.
References FormValidator\getFieldValue(), and FormValidator\isEmptyAndOptional().
array FormValidatorInSet::$_acceptedValues |
of all values accepted as valid
Definition at line 24 of file FormValidatorInSet.inc.php.