Feature #6456
Customization/localization of validator errors
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | Validation | |||
Target version: | - | Estimated time: | 12.00 hours | |
PHP Version: | Complexity: | |||
Has patch: | No |
Description
Add the possibility to customize the validation error messages. For example: in Zend Framework each validator has a list of "message templates" and for the several types of errors each validator defines its own constants. These messages contain placeholders (value) which are replaced.
In the future this could be attached to a localization/translator object.
Related issues
History
#1 Updated by Robert Lemke over 5 years ago
- Status changed from New to Accepted
- Target version set to 1.0 alpha 9
- Start date deleted (
2010-02-12) - Estimated time set to 12.00
#2 Updated by Robert Lemke about 5 years ago
- Target version deleted (
1.0 alpha 9)
#3 Updated by Robert Lemke about 5 years ago
- Category changed from Validation to I18n
This will mainly be provided by the new localization functionality Karol is working on.
#4 Updated by Karsten Dambekalns over 3 years ago
- Category deleted (
I18n) - Status changed from Accepted to New
- Has patch set to No
#5 Updated by Karsten Dambekalns over 3 years ago
- Category set to Validation
#6 Updated by Bastian Waidelich over 3 years ago
With the current version and #33970 applied this works quite nice. The respective Fluid code looks something like:
1<f:form.validationResults for="{property}"> 2 <f:for each="{validationResults.errors}" as="error"> 3 {error -> f:translate(key: error.code, arguments: error.arguments, package: 'TYPO3.FLOW3', source: 'ValidationErrors')} 4 </f:for> 5</f:form.validationResults>
There is also an issue for making the validator code & message overridable (#33970) for even more flexibility. So I suggest to close this issue.
#7 Updated by Christian Müller over 3 years ago
- Status changed from New to Closed