Task #12991

Task #26664: Clean up Form ViewHelpers

Task #26658: Make Form ViewHelpers consistent

form.errors ViewHelper should merge property errors

Added by Alexander Stehlik over 11 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
ViewHelpers
Target version:
-
Start date:
2011-02-11
Due date:
% Done:

0%

Estimated time:
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.


Files

#2

Updated by Sebastian Kurfuerst about 11 years ago

  • Parent task set to #26658
#3

Updated by Robert Lemke over 10 years ago

  • Target version changed from 1.0 beta 2 to 1.0.0
#4

Updated by Karsten Dambekalns over 10 years ago

  • Target version deleted (1.0.0)
#5

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.

Also available in: Atom PDF