[TYPO3-mvc] CHANGE: ValidatorInterface is now required for custom validators
Xavier Perseguers
typo3 at perseguers.ch
Sat Aug 1 11:15:22 CEST 2009
Hi Sebastian,
>> class LocaleDateTime
>> extends DateTime
>> implements Tx_Extbase_Validation_Validator_ValidatorInterface {
>>
>> ...
>> }
> Nope, your domain classes should certainly NOT implement the
> ValidatorInterface. Are you really sure this is needed? If yes, it'd be
> great to have a small testcase so we can fix this.
I would agree with you but if I do not implement the interface, I get
this error:
Fatal error: Call to undefined method LocaleDateTime::setOptions() in
/path/to/extbase/Classes/Validation/ValidatorResolver.php on line 88
39 1.1388 30762440 Tx_Fluid_ViewHelpers_ForViewHelper->render( )
../ViewHelperNode.php:0
40 1.1388 30763968
Tx_Fluid_Core_ViewHelper_AbstractViewHelper->renderChildren( )
../ForViewHelper.php:85
41 1.1388 30764052
Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode->evaluateChildNodes( )
../AbstractViewHelper.php:226
42 1.1388 30764604
Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode->evaluate( )
../AbstractNode.php:80
43 1.1394 30773600
Tx_Fluid_Core_ViewHelper_AbstractViewHelper->validateArguments( )
../ViewHelperNode.php:161
44 1.1394 30776288
Tx_Extbase_Validation_ValidatorResolver->createValidator( )
../AbstractViewHelper.php:318
--
Xavier Perseguers
http://xavier.perseguers.ch/en
One contribution a day keeps the fork away
More information about the TYPO3-project-typo3v4mvc
mailing list