Open rkenshin opened 11 years ago
This is an interesting feature, and I think it should be possible to set custom messages at different levels:
Ember.ValidationError.addMessage()
)foo
property in your example above)presence
validation of the foo
property).Do you have any thought?
Is there any progress going on this? It would be very useful if framework allows to specify custom messages at property validation level as specified in the above scenario for better and more customizations.
:+1:
:+1:
:thumbsup:
I am working on a website that is heavily dependent on i18n and need error messages to be defined manually depending on the language...so to use ember-validations, I will need this feature.
:+1:
I also hope to see this feature soon. I do not have the time needed to implement it soon, but I'll be glad to consider a PR !
Apart from explicitly overriding the message with the right key, i didn't see anywhere in the source code to declaratively add custom error message
Ember.ValidationError.addMessage('blank', "can't be blank");
vs
foo { presence: true message: "This is a required field" }