Task #12991
Task #26664: Clean up Form ViewHelpers
Task #26658: Make Form ViewHelpers consistent
form.errors ViewHelper should merge property errors
0%
Description
At the moment, the form.errors view helper returns, when the first PropertyError with the correct property name was found.
This is not sufficient because someone might add more errors to the errors array for the same property. So if I add a new property error in my validator, it won't get rendered, if the validators defined by @ annotations also added errors for the same property before.
This is what I do in the validator of my domain model:
$error = t3lib_div::makeInstance('Tx_Extbase_Validation_PropertyError', 'mypropertyname'); $error->addErrors(array(new Tx_Extbase_Validation_Error('My error message.', 1233456789))); $this->errors[] = $error;
At first, I reported this as an exbase bug (#9215) but I think this is more a issue of the form.errors view helper.
I'll attached a patch that should fix this issue.
Files
Updated by Alexander Stehlik over 11 years ago
Updated by Christian Müller about 10 years ago
- Status changed from New to Resolved
- Has patch set to No
This is possible in the meantime with the ValidationResults ViewHelper in FLOW3.