You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportdefaultclassMyModelextendsModel{
@attr('string')name;
@belongsTo('category')category;validations={name: {presence: {message: 'Please enter name'},},category: {presence: {message: 'Please select a category'},},};}
If you run validation when nothing is entered, errors will appear on 2 input fields. When you start entering a name, the error on the name will disappear automatically. But when you select a category, you need to run validation again for the error to disappear.
Is it possible to validate automatically?
Now I'm using notifyPropertyChange function to solve this issue in my common model like this:
ember-data 3.28, ember-model-validator 4.8
If you run validation when nothing is entered, errors will appear on 2 input fields. When you start entering a name, the error on the name will disappear automatically. But when you select a category, you need to run validation again for the error to disappear.
Is it possible to validate automatically?
Now I'm using
notifyPropertyChange
function to solve this issue in my common model like this:The text was updated successfully, but these errors were encountered: