-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support runtime recomputing error messages #12
Comments
Could add
|
Yup, was opened prior to this being supported. Closing now but thanks for adding details since others may not known! |
@jasonmit native support would be fine anyway. My work-a-round is far from being optimal: Property is revalidated if locale changes and a lot of boilerplate code is needed. I think we should leave this one open as a feature request. |
If you override
You still have to inject i18n service to model and consume |
Unsure I want to go down that road, that's making the assumption that everyone injects the service with the i18n key. While it's likely true for most, to me it doesn't feel right. I'm opened to exploring ways to make this integration easier though, just unsure what that would look like. Reopening for discussion |
It's not more than this changes to ember-cp-validations needed: jelhan/ember-cp-validations@eeac8b5 Of course a refactoring would be necessary to let us override these internals. |
Some coordination with @offirgolan would be necessary to expose that encapsulated type the factory method returns. |
This solution will not work since any validator that has dependents will override the base What I could do is always concat the contents of the dependents in
In terms of service injection, I think the best solution would be to add documentation to tell users they have to inject the service in their model/component/etc. I dont really like the idea of forcefully injecting services. |
I share this same opinion that this is best solved with documentation |
Let me know if you want me to work on my first point or if you just prefer to add more documentation telling users to add the necessary dependentKeys to their global options. |
adopted-ember-addons/ember-cp-validations#146 resolved this with the ability to add "global" dependentKeys preventing having to add i18n.locale to each validation. |
No description provided.
The text was updated successfully, but these errors were encountered: