[TYPO3-50-general] optional or nested validators

Pascal Jungblut mail at pascal-jungblut.com
Fri Oct 9 13:45:13 CEST 2009


On 09.10.2009, at 12:31, Laurent Valdes wrote:

> Hiya All,
> why don't you type some aspects for that ?
> Is it possible ?

I'd like to use aspects, but I'm developing for v4.3 where you AFAIK  
can't use AOP.

> 2009/10/9 Martin Kutschker <masi-no at spam-typo3.org>
>> Pascal Jungblut schrieb:
>>> Hello,
>>> I'm curious about the validation feature. Let's assume I have an
>>> optional field in fe_users (e.g. 'zip'). I want the user to enter  
>>> either
>>> nothing _or_ a five-digit number.
>> IMHO "required" is a field property not a validation. v4 any many
>> extensions get that mixed up.

You're right that "required" is actually a field property and that  
validation is a different aspect. Thanks for the clarification.

However, chaining validators with OR and AND would be great as  
combining validators would be a powerful tool that allows one to keep  
the validators simple. Don't get me wrong, I don't want to put all the  
logic in the comment-block, but right now I can't access the  
DisjunctionValidator because everything is concatenated with AND.


More information about the TYPO3-project-5_0-general mailing list