Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct (&$form, $field, $type, $message, $userFunction, $additionalArguments=array(), $complementReturn=false, $fields=array(), $isLocaleField=false) | |
getErrorFields () | |
isArray () | |
isLocaleField () | |
isValid () | |
Public Member Functions inherited from FormValidator | |
__construct (&$form, $field, $type, $message, $validator=null) | |
getField () | |
getFieldValue () | |
& | getForm () |
getMessage () | |
getType () | |
& | getValidator () |
isEmptyAndOptional () | |
Data Fields | |
$_additionalArguments | |
$_complementReturn | |
$_errorFields | |
$_fields | |
$_isLocaleField | |
$_userFunction | |
Data Fields inherited from FormValidator | |
$_field | |
$_form | |
$_message | |
$_type | |
$_validator | |
Form validation check with a custom user function performing the validation check of an array of fields.
Definition at line 18 of file FormValidatorArrayCustom.inc.php.
FormValidatorArrayCustom::__construct | ( | & | $form, |
$field, | |||
$type, | |||
$message, | |||
$userFunction, | |||
$additionalArguments = array() , |
|||
$complementReturn = false , |
|||
$fields = array() , |
|||
$isLocaleField = false |
|||
) |
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) |
$userFunction | function the user function to use for validation |
$additionalArguments | array optional, a list of additional arguments to pass to $userFunction |
$complementReturn | boolean optional, complement the value returned by $userFunction |
$fields | array all subfields for each item in the array, i.e. name[][foo]. If empty it is assumed that name[] is a data field |
$isLocaleField | boolean |
Definition at line 68 of file FormValidatorArrayCustom.inc.php.
FormValidatorArrayCustom::getErrorFields | ( | ) |
Get array of fields where an error occurred.
Definition at line 85 of file FormValidatorArrayCustom.inc.php.
References $_errorFields.
FormValidatorArrayCustom::isArray | ( | ) |
Is the field an array.
Definition at line 178 of file FormValidatorArrayCustom.inc.php.
References FormValidator\getFieldValue().
FormValidatorArrayCustom::isLocaleField | ( | ) |
Is it a multilingual-capable field.
Definition at line 93 of file FormValidatorArrayCustom.inc.php.
References $_isLocaleField.
Referenced by isValid().
FormValidatorArrayCustom::isValid | ( | ) |
Reimplemented from FormValidator.
Definition at line 105 of file FormValidatorArrayCustom.inc.php.
References FormValidator\getField(), FormValidator\getFieldValue(), FormValidator\getType(), FormValidator\isEmptyAndOptional(), and isLocaleField().
array FormValidatorArrayCustom::$_additionalArguments |
Additional arguments to pass to $userFunction
Definition at line 48 of file FormValidatorArrayCustom.inc.php.
boolean FormValidatorArrayCustom::$_complementReturn |
If true, field is considered valid if user function returns false instead of true
Definition at line 54 of file FormValidatorArrayCustom.inc.php.
array FormValidatorArrayCustom::$_errorFields |
Array of field names where an error occurred
Definition at line 30 of file FormValidatorArrayCustom.inc.php.
Referenced by getErrorFields().
array FormValidatorArrayCustom::$_fields |
Array of fields to check
Definition at line 24 of file FormValidatorArrayCustom.inc.php.
boolean FormValidatorArrayCustom::$_isLocaleField |
is the field a multilingual-capable field
Definition at line 36 of file FormValidatorArrayCustom.inc.php.
Referenced by isLocaleField().
callable FormValidatorArrayCustom::$_userFunction |
Custom validation function
Definition at line 42 of file FormValidatorArrayCustom.inc.php.