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

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 FormValidatorArrayCustom.inc.php.

Member Function Documentation

FormValidatorArrayCustom::FormValidatorArrayCustom ( $form,
  $field,
  $type,
  $message,
  $userFunction,
  $additionalArguments = array(),
  $complementReturn = false,
  $fields = array(),
  $isLocaleField = false 
)

Constructor.

Parameters
$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
$isLocaleFieldboolean

Definition at line 50 of file FormValidatorArrayCustom.inc.php.

FormValidatorArrayCustom::getErrorFields ( )

Get array of fields where an error occurred.

Returns
array

Definition at line 67 of file FormValidatorArrayCustom.inc.php.

FormValidatorArrayCustom::isArray ( )

Is the field an array.

Returns
boolean

Definition at line 160 of file FormValidatorArrayCustom.inc.php.

References FormValidator\getFieldValue().

FormValidatorArrayCustom::isLocaleField ( )

Is it a multilingual-capable field.

Returns
boolean

Definition at line 75 of file FormValidatorArrayCustom.inc.php.

Referenced by isValid().


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