lcoq / ember-validations

Ember-Validations - An Ember.js library for handling object validations
MIT License
122 stars 25 forks source link

Allow error message to be customized declaratively #13

Open rkenshin opened 11 years ago

rkenshin commented 11 years ago

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" }

lcoq commented 11 years ago

This is an interesting feature, and I think it should be possible to set custom messages at different levels:

Do you have any thought?

vecsuresh commented 11 years ago

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.

niuage commented 11 years ago

:+1:

midu commented 11 years ago

:+1:

mawek commented 11 years ago

:thumbsup:

abobwhite commented 11 years ago

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.

lholmquist commented 11 years ago

:+1:

lcoq commented 11 years ago

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 !