[TYPO3-mvc] Customize extbase BooleanValidator? Unique IDs for error messages?

Master Chief chief75 at web.de
Sun Oct 11 12:37:40 CEST 2015


Dear all,

I'm using an extension which relies on the extbase default validators. Using typoscript and the appropriate key I was able to change the error texts via 

plugin.tx_extbase._LOCAL_LANG.de.KEY = X

The BooleanValidator.php is written a bit differently, as it doesn't use the translateErrorMessage method so I was unsure about the key. I changed the BooleanValidator.php accordingly:

				//$this->addError('The given subject is not true.', 1361959230);

				$this->addError(
					$this->translateErrorMessage(
						'validator.notbool',
						'extbase'
					), 1361959230);

and it works. But I assume this is not a best practice apporach :) So the question is, what is the best way to accomplish the goal? (custom text for extbase validator)

Is this an open todo in extbase? the other validators seem to be consistent. And finally, did I get it right that the IDs are globally unique? How are they created? (for example if a new developer wants to add a validator).

Best regards, Masterchief


More information about the TYPO3-project-typo3v4mvc mailing list