[Flow] Using aspects to change EmailAddressValidator
Bastian Waidelich
bastian at typo3.org
Mon Jan 6 10:36:33 CET 2014
Pankaj Lele wrote:
Hi Steffen & Pankaj,
> If you want a different EmailAddressValidator then instead of changing the existing EmailAddressValidator
> using AOP you can develop a new validator itself and use it directly. This would be a clean way.
+1
You can extend the original EmailAddressValidator[1] to
\Your\Package\Validation\Validator\EmailAddressValidator, override its
validEmail() method and refer to it via:
@Flow\Validate(type="Your.Package:EmailAddress")
If you want to change the behavior for 3rd party code you should be able
to replace the original implementation via Objects.yaml.
> Happy New Year!
+2 ;)
[1]
https://git.typo3.org/Packages/TYPO3.Flow.git/blob/HEAD:/Classes/TYPO3/Flow/Validation/Validator/EmailAddressValidator.php
--
Bastian Waidelich
More information about the Flow
mailing list