Open hohwille opened 9 years ago
It is not yet possible, but I agree that such an option would be handy if you don't generate your constraints (for example using valdr-bean-validation) but write them by hand.
@hohwille I figure this out by implementing this:
mainApp.config(function (valdrMessageProvider,$translateProvider) {
valdrMessageProvider.setTemplate('
');});
I'm changing the template to include translate and allow the valdr use it instead of having the raw messages.
Hope it helps
Thanks, meanwhile I also came to the almost same solution. It would be nice to have this in the documentation. However, for the code feel free to close this issue.
With I18N support you will typically use message keys and angular-translate. Then you will quickly notice that you start writing
This is not DRY (dont repeat yourself). Instead I would expect that I can define a default message per constraint in a central place. If this is already possible then consider this as a documentation enhancement otherwise a feature request. Thanks!