Extbase validation

Writing a custom validation:

source : http://web-union.de/421


class Tx_ContactForm_Validation_Validator_PhoneNumberValidator extends Tx_Extbase_Validation_Validator_AbstractValidator
public function isValid($value)
$this->errors = array();
if(preg_match('#([^0-9\-\+\(\)\s])#', $value))
$this->addError('The given subject is no valid value.', 40213131);
return false;
return true;

* @validate Tx_ContactForm_Validation_Validator_PhoneNumberValidator
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge