Open Journal Systems  2.4.8
 All Classes Namespaces Functions Variables Groups Pages
FormValidatorArrayCustom Class Reference
Inheritance diagram for FormValidatorArrayCustom:

Public Member Functions

 FormValidatorArrayCustom (&$form, $field, $type, $message, $userFunction, $additionalArguments=array(), $complementReturn=false, $fields=array(), $isLocaleField=false)
 getErrorFields ()
 isArray ()
 isLocaleField ()
 isValid ()
- Public Member Functions inherited from FormValidator
 FormValidator (&$form, $field, $type, $message, $validator=null)
 getField ()
 getFieldValue ()
getForm ()
 getMessage ()
 getType ()
getValidator ()
 isEmptyAndOptional ()
 isValid ()
 setForm (&$form)

Detailed Description

Form validation check with a custom user function performing the validation check of an array of fields.

Definition at line 18 of file

Member Function Documentation

FormValidatorArrayCustom::FormValidatorArrayCustom ( $form,
  $additionalArguments = array(),
  $complementReturn = false,
  $fields = array(),
  $isLocaleField = false 


$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)
$userFunctionfunction the user function to use for validation
$additionalArgumentsarray optional, a list of additional arguments to pass to $userFunction
$complementReturnboolean optional, complement the value returned by $userFunction
$fieldsarray all subfields for each item in the array, i.e. name[][foo]. If empty it is assumed that name[] is a data field

Definition at line 50 of file

FormValidatorArrayCustom::getErrorFields ( )

Get array of fields where an error occurred.


Definition at line 67 of file

FormValidatorArrayCustom::isArray ( )

Is the field an array.


Definition at line 160 of file

References FormValidator\getFieldValue().

FormValidatorArrayCustom::isLocaleField ( )

Is it a multilingual-capable field.


Definition at line 75 of file

Referenced by isValid().

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