
Public Member Functions | |
| showJsValidationString ($typePath, $messagePrefix) | |
| Prints javascript for this validator. | |
| validate ($messagePrefix, $value) | |
| Does the validation. | |
Protected Member Functions | |
| __construct ($messageKey) | |
| Constructor. | |
Protected Attributes | |
| $messageKey | |
| Translation key for the error message. | |
Provides a message key for translations and states that it cannot generate validation js by default.
Definition at line 8 of file FieldValidator.class.php.
| spunQ_FieldValidator::__construct | ( | $ | messageKey | ) | [protected] |
Constructor.
| $messageKey | Translation key for the error message to be displayed if the value is invalid. |
Reimplemented in spunQ_CheckedValidator, and spunQ_NotNullValidator.
Definition at line 21 of file FieldValidator.class.php.
| spunQ_FieldValidator::showJsValidationString | ( | $ | typePath, | |
| $ | messagePrefix | |||
| ) |
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_IFieldValidator::validate | ( | $ | messagePrefix, | |
| $ | value | |||
| ) | [inherited] |
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. Implemented in spunQ_ArrayLengthValidator, spunQ_CheckedValidator, spunQ_DateRangeValidator, spunQ_EmailSyntaxValidator, spunQ_NotNullValidator, spunQ_StringLengthValidator, spunQ_UniqueMemberValidator, and spunQ_UrlSyntaxValidator.
spunQ_FieldValidator::$messageKey [protected] |
Translation key for the error message.
Definition at line 14 of file FieldValidator.class.php.
1.5.9