Closed radek closed 6 years ago
:thumbsup: I really need this in my Ember application!
Thank you @radek ! /cc @johnkpaul
I like the idea, but I think this is a bad idea to override the validations
property.
The validate
method could directly handle scopes. When a string is passed as argument (ie the context), it search the {context}Validations
instead of validations
.
This could be a starting point, so the next version will use the #17 API suggestion.
Do you have any thoughts about that ?
This will allow to have more then one validation rules per model. I.e. user model can be validated by main validate() method and/or validateContext('profileUpdate') method.