[TYPO3-mvc] Model validator: How to tie a validation error to a property in extbase >= 1.4?

Oliver Klee typo3-german-02 at oliverklee.de
Mon Mar 19 17:13:10 CET 2012


Hi all,

I'm currently trying to find out how to tie a validation error to a
certain field in my model validator. As of extbase 1.4, $this->errors
and Tx_Extbase_Validation_PropertyError are deprecated, and so this code
uses deprecated code:

class Tx_Foo_Domain_Validator_CoffeeValidator extends
Tx_Extbase_Validation_Validator_AbstractValidator {
	public function isValid($model) {
		$this->errors = array();
		$this->errors['name'] = new
Tx_Extbase_Validation_PropertyError('name', 1331893182);
...

On the wiki page about 1.4, the part about the new validation API is
still marked as missing:
<http://forge.typo3.org/projects/typo3v4-mvc/wiki/Extbase_Version_14>

So, what's the proper way to add validation errors for certain model
field in my model validator in extbase >= 1.4 (while still using the old
property mapper)?

Thanks,


Oli


More information about the TYPO3-project-typo3v4mvc mailing list