[+BUGFIX] Extbase (Validation): Temporarily fixed the ValidatorResolver so that it...
authorIngmar Schlecht <ingmar@typo3.org>
Sat, 12 Sep 2009 10:17:58 +0000 (10:17 +0000)
committerIngmar Schlecht <ingmar@typo3.org>
Sat, 12 Sep 2009 10:17:58 +0000 (10:17 +0000)
typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php

index 3618325..13de924 100644 (file)
@@ -208,7 +208,8 @@ class Tx_Extbase_Validation_ValidatorResolver {
         * @return string Name of the validator object or FALSE
         */
        protected function resolveValidatorObjectName($validatorName) {
         * @return string Name of the validator object or FALSE
         */
        protected function resolveValidatorObjectName($validatorName) {
-               if (class_exists($validatorName)) return $validatorName;
+               // @TODO: Quick and dirty:
+               if (class_exists($validatorName) && substr($validatorName, -9) === 'Validator') return $validatorName;
 
                $possibleClassName = 'Tx_Extbase_Validation_Validator_' . $this->unifyDataType($validatorName) . 'Validator';
                if (class_exists($possibleClassName)) return $possibleClassName;
 
                $possibleClassName = 'Tx_Extbase_Validation_Validator_' . $this->unifyDataType($validatorName) . 'Validator';
                if (class_exists($possibleClassName)) return $possibleClassName;