
Public Member Functions | |
| __construct ($firstParameterName= 'from', $secondParameterName= 'to') | |
| Constructor. | |
| validate ($messagePrefix, $value) | |
| Does the validation. | |
| showJsValidationString ($typePath, $messagePrefix) | |
| Prints javascript for this validator. | |
| validateForm (spunQ_Form $form) | |
| Validates the form. | |
Protected Attributes | |
| $firstParameterName | |
| Name of the first DateField in the range. | |
| $secondParameterName | |
| Name of the second DateField in the range. | |
Makes sure that the first date precedes the second date.
Definition at line 7 of file DateRangeValidator.class.php.
| spunQ_DateRangeValidator::__construct | ( | $ | firstParameterName = 'from', |
|
| $ | secondParameterName = 'to' | |||
| ) |
Constructor.
| $firstParameterName | Name of the first DateField in the range. The name of a field in the FieldGroup/Form to be used. | |
| $firstParameterName | Name of the second DateField in the range. |
Definition at line 29 of file DateRangeValidator.class.php.
| spunQ_DateRangeValidator::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.
Definition at line 53 of file DateRangeValidator.class.php.
| spunQ_DateRangeValidator::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 38 of file DateRangeValidator.class.php.
| spunQ_DateRangeValidator::validateForm | ( | spunQ_Form $ | form | ) |
Validates the form.
Implements spunQ_IFormValidator.
Definition at line 60 of file DateRangeValidator.class.php.
spunQ_DateRangeValidator::$firstParameterName [protected] |
Name of the first DateField in the range.
The name of a field in the FieldGroup/Form to be used.
Definition at line 14 of file DateRangeValidator.class.php.
spunQ_DateRangeValidator::$secondParameterName [protected] |
Name of the second DateField in the range.
Definition at line 21 of file DateRangeValidator.class.php.
1.5.9