spunQ_IFieldValidator Interface Reference

Validates a submitted spunQ value. More...

Inheritance diagram for spunQ_IFieldValidator:

spunQ_DateRangeValidator spunQ_EmailSyntaxValidator spunQ_FieldValidator spunQ_UniqueMemberValidator spunQ_UrlSyntaxValidator spunQ_ArrayLengthValidator spunQ_CheckedValidator spunQ_NotNullValidator spunQ_StringLengthValidator

List of all members.

Public Member Functions

 validate ($messagePrefix, $value)
 Does the validation.
 showJsValidationString ($typePath, $messagePrefix)
 Prints javascript for this validator.


Detailed Description

Validates a submitted spunQ value.

See also:
spunQ_IFieldValueConverter For the definition of 'spunQ value'.

Definition at line 7 of file IFieldValidator.interface.php.


Member Function Documentation

spunQ_IFieldValidator::showJsValidationString ( typePath,
messagePrefix 
)

Prints javascript for this validator.

Should make use a call to the spunQ javascript function spunQ.form.registerValidator().

Parameters:
$messagePrefix A string to prepend to the error message key.
Returns:
boolean Whether any validation javascript was displayed.

Implemented in spunQ_DateRangeValidator, spunQ_EmailSyntaxValidator, spunQ_FieldValidator, spunQ_StringLengthValidator, spunQ_UniqueMemberValidator, and spunQ_UrlSyntaxValidator.

spunQ_IFieldValidator::validate ( messagePrefix,
value 
)

Does the validation.

Parameters:
$messagePrefix A string to prepend to the error message key.
$value The spunQ value to validate.
Returns:
string Error message for the validated field, or 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.


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

Generated on Fri Jul 1 11:12:41 2011 for spunQ3 by  doxygen 1.5.9