[TYPO3-mvc] How to validate if input value is unique in table?

Uwe Michelfelder um at limeflavour.com
Fri Feb 26 15:52:43 CET 2010


Hi Manuel,

this gives me in my case only an error message, but the errorClass
Attribute is not set in form.textbox, which is validated with this
validator. Does it work at your case?

Greetings,
Uwe

Am 24.02.10 20:26, schrieb Manuel Simon:
> Hello Uwe,
> 
> currently it works this way:
> 
> [..]
> $error = false;
> 
> if(condition) {
> $this->addError(Tx_Extbase_Utility_Localization::translate('Errorstring', 'yourpluginname'),
> 1266341150);
> $error = true;
> }
> 
> [..]
> 
> return !error;
> 
> Of course you may use a $valid = true; variable and set it in your if
> clause to false and just return it... ;-)
> 
> Greetings,
> Manuel



More information about the TYPO3-project-typo3v4mvc mailing list