[TYPO3-mvc] Validation for EmailAddress called when nothing is filled in, not required property

Claus Due claus at wildside.dk
Thu Jul 14 17:54:55 CEST 2011


Hi Bastian et al,

What about this notation (hopefully self-explanatory)?

@validate Empty OR (NotEmpty AND (Text OR SomeCustomValidation))
@validate EmailAddress OR Empty
@validate Empty OR ((Float OR Number OR Integer) AND NotEmpty)

Parentheses are required for a compact annotation of complex nested conditions, I think. Also - such an annotation with Conjunction/Disjunction would be quite big and unintelligible in comparison.

IMHO multiple validation lines should always be considered an implicit AND constraint as it is now. Apart from this, conjunction/disjunction should be possible in a single line.

Your thoughts on this?

--

Med venlig hilsen / Kind regards

Claus Due
Code Monkey
--
Wildside A/S
Katrinebjergvej 113, DK-8200 Århus N
tlf. 86 12 64 65
http://www.wildside.dk

On Jul 14, 2011, at 4:55 PM, Bastian Waidelich wrote:

> But of course you're right, this should be possible and is already planned. There is already a conjunction and disjunction validator that could be used to logically combine multiple validators (via AND/OR). The part that's missing is the format of the annotation.. If you have an idea, feel free to share it.



More information about the TYPO3-project-typo3v4mvc mailing list