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

Public Member Functions

 FormValidatorLength (&$form, $field, $type, $message, $comparator, $length)
 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 that checks if a field's length meets certain requirements.

Definition at line 18 of file

Member Function Documentation

FormValidatorLength::FormValidatorLength ( $form,


$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)

Definition at line 35 of file

FormValidatorLength::isValid ( )
See Also
FormValidator::isValid() Value is valid if it is empty and optional or meets the specified length requirements.

Definition at line 50 of file

References FormValidator\getFieldValue(), FormValidator\isEmptyAndOptional(), and String\strlen().

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