
Public Member Functions | |
| __construct ($min=NULL, $max=NULL, $messageKey= 'InvalidLength') | |
| Constructor. | |
| validate ($messagePrefix, $value) | |
| Does the validation. | |
| showJsValidationString ($typePath, $messagePrefix) | |
| Prints javascript for this validator. | |
Protected Attributes | |
| $min | |
| Minimum array length. | |
| $max | |
| Maximum array length. | |
| $messageKey | |
| Translation key for the error message. | |
Definition at line 6 of file ArrayLengthValidator.class.php.
| spunQ_ArrayLengthValidator::__construct | ( | $ | min = NULL, |
|
| $ | max = NULL, |
|||
| $ | messageKey = 'InvalidLength' | |||
| ) |
Constructor.
| $min | Minimum array length. | |
| $max | Maximum array length. | |
| $messageKey | Translation key for the error message to be displayed if the value is invalid. The translation will recieve three parameters: actual array length, minimum array length and maximum array length. |
Definition at line 29 of file ArrayLengthValidator.class.php.
| spunQ_FieldValidator::showJsValidationString | ( | $ | typePath, | |
| $ | messagePrefix | |||
| ) | [inherited] |
Prints javascript for this validator.
Should make use a call to the spunQ javascript function spunQ.form.registerValidator().
| $messagePrefix | A string to prepend to the error message key. |
Implements spunQ_IFieldValidator.
Reimplemented in spunQ_StringLengthValidator.
Definition at line 29 of file FieldValidator.class.php.
| spunQ_ArrayLengthValidator::validate | ( | $ | messagePrefix, | |
| $ | value | |||
| ) |
Does the validation.
| $messagePrefix | A string to prepend to the error message key. | |
| $value | The spunQ value to validate. |
NULL if the value was valid. Implements spunQ_IFieldValidator.
Definition at line 39 of file ArrayLengthValidator.class.php.
spunQ_ArrayLengthValidator::$max [protected] |
spunQ_FieldValidator::$messageKey [protected, inherited] |
Translation key for the error message.
Definition at line 14 of file FieldValidator.class.php.
spunQ_ArrayLengthValidator::$min [protected] |
1.5.9