[FLOW3-general] Validation of ElectronicAddress items
Steffen Wickham
steffen at gaming-inc.de
Fri Jul 20 16:34:40 CEST 2012
Hello,
I'm currently working on adding some electronic addresses to my user
profiles. After 2 hours of brain cracking investigations in the deep of
the TYPO3.Party package I'm stuck on forced validation of its items.
When I add a new \TYPO3\Party\Domain\Model\ElectronicAddress object with
type="Email" and a proper email address for the identifier variable
everything works fine.
But when I add another object with any other type except "Email", I
still get an error message (no exception!) as follows:
An error occurred while trying to call
AFSVN\Base\Controller\RefereeController->showAction(). Error for
referee.person.electronicAddresses.1: No validator found for electronic
address of type "Skype".
So I created a new validator for my Skype addresses and called the class
"SkypeAddressValidator" and derived it from
\TYPO3\FLOW3\Validation\Validator\AbstractValidator like the provided
validator for email addresses of the FLOW3 framework. But i couldn't
figure out, how to tell the framework to use this validator for this
validation. I tried to put it in Validation, Validation/Validator and
Validator subfolders of my package (and changed the namespace
accordingly) but nothing changed.
Is there a method I just hadn't seen or where can I "register" this
validator for electronic addresses?
Many thnaks in advance!
Steffen
More information about the FLOW3-general
mailing list