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

Manuel Simon typo3 at it11.info
Wed Feb 24 20:26:30 CET 2010


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