Task #12991
Task #26664: Clean up Form ViewHelpers
Task #26658: Make Form ViewHelpers consistent
form.errors ViewHelper should merge property errors
Status: | Resolved | Start date: | 2011-02-11 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | ViewHelpers | |||
Target version: | - | |||
Has patch: | No |
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.
History
#1 Updated by Alexander Stehlik over 4 years ago
- File sysext-fluid-12991-form_error_merge.diff
added
#2 Updated by Sebastian Kurfuerst about 4 years ago
- Parent task set to #26658
#3 Updated by Robert Lemke almost 4 years ago
- Target version changed from 1.0 beta 2 to 1.0.0
#4 Updated by Karsten Dambekalns almost 4 years ago
- Target version deleted (
1.0.0)
#5 Updated by Christian Müller over 3 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.