[TYPO3-mvc] Validation in TCA and extbase

Jochen Rau jochen.rau at typoplanet.de
Wed Oct 14 17:57:42 CEST 2009


Hi Jigal.

Jigal van Hemert wrote:
> Bastian Waidelich wrote:
>> I don't think, that we need to sync Extbase with TCA, at least not
>> automatically.
>> In a lot of cases you want _different_ validation rules in the TCE.
>> E.G. you might want to allow "Extbase" as blog title in the BE but not
>> in the FE.
>
> I meant that the *available* validation rules should be in sync. For
> example, there is a validator rule "EmailAddress" in extbase, but no
> such thing in the TCE. On the other hand, I think that there are eval
> options for TCE which are not available in extbase.
>
> So, if I wanted to have the same validation rules in FE and in BE then
> it is not always possible at the moment.

I wrote a reply to Bestians message but the system ate it :-(

I argued the same way. It would be great to have the validation rules of 
Extbase "at hand" in the TCA like

"eval" => "Tx_Extbase_Validation_Validator_EmailAddressValidator"

After I read the f****** manual, a have to admit that this is already 
possible (nearly). Even the JavaScript stuff.

>> I think, it would make more sense to validate objects only when they
>> are changed - Imagine you want to introduce a new validation rule, but
>> you want to keep the existing objects untouched.
>
> True. I was surprised that validation was turned on by default with the
> showAction. It seems sensible to turn it off there.

I agree, too. We should provide a method to easily find and adjust 
invalid existing data.

Regards
Jochen

-- 
Every nit picked is a bug fixed



More information about the TYPO3-project-typo3v4mvc mailing list