ember-intl / cp-validations

ember-intl support for ember-cp-validations
MIT License
10 stars 13 forks source link

getDescriptionFor does not use the attribute #9

Closed ajgordo closed 8 years ago

ajgordo commented 8 years ago

Looking at getDescriptionFor, this is used to describe the field, and we have it set to things like username, or First Name. Looking at the method that has been overridden by ember-intl-cp-validations it seems that the description does not take the attribute in to account and instead uses just prefix and .description, making the output errors.description for all validations. This doesn't seem quite right to me?

jasonmit commented 8 years ago

https://github.com/jasonmit/ember-i18n-cp-validations#translating-validator-description

This has already been implemented in ember-i18n-cp-validations, I just haven't ported it over. But being able to specify a description key is likely what you're after - correct?

ajgordo commented 8 years ago

I just took a look at ember-i18n-cp-validations and yes, that is exactly what I am looking for!

jasonmit commented 8 years ago

Awesome, I can port it over tonight or feel free to take a shot at it in the meantime.

jasonmit commented 8 years ago

Versioned as 2.2.0, thanks for reporting this