Feature #43841

Add package support to validation errors

Added by Marco Falkenberg over 2 years ago.

Status:New Start date:2012-12-10
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:-
Target version:-
PHP Version: Complexity:
Has patch:No

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 bu... Needs Feedback 2011-07-22

Also available in: Atom PDF