I'm using ember-validations and what is in Ember the right way to use the same validation rules between Add and Edit controller?
Doing this it is not the DRY way
App.UsersAddUserController.reopen(Ember.Validations.Mixin, {
validations: {
name: {
presence: true,
length: { minimum: 3 }
},
surname: {
presence: true,
length: { minimum: 3 }
}
},
});
App.UsersEditUserController.reopen(Ember.Validations.Mixin, {
validations: {
name: {
presence: true,
length: { minimum: 3 }
},
surname: {
presence: true,
length: { minimum: 3 }
}
},
});