Feature #43841

Add package support to validation errors

Added by Marco Falkenberg over 8 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-12-10
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

Right now it's not possible to display translated validation errors thrown from validators out of more than one package, because you have to hard-code the package name in the translation viewhelper when displaying the errors. This would be very useful, so you do not have to merge translations from the core packages into you customized language file and keep track of changes. AFAIK there also is no support for inheritence in the XLIFF-specs.

A possible solution could be, to extend the validation with a package name when calling 'addError' on the validation provider. Then you do something like this:

<f:form.validationResults for="{property}">
    <f:for each="{validationResults.errors}" as="error">
       {error -> f:translate(key: error.code, arguments: error.arguments, package: error.packageName, source: 'ValidationErrors')}
    </f:for>
</f:form.validationResults>

Related issues

Related to TYPO3.Flow - Feature #28399: Validation message and code should be configurable for bundled validatorsNeeds Feedback2011-07-22

Actions

No data to display

Also available in: Atom PDF