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
validate my relation is presence but is not validate .
i try validate a computed relation id is it working, probably it is check relation but is not checked a content of relation
@belongsTo('city') city;
@belongsTo('state') state;
@computed('state') get state2() {
return get(this,'state.id');
}
@computed('city') get city2() {
return get(this,'city.id');
}
validations = {
city2:{
presence: {
message: "A cidade é necessária."
},
},
state2:{
presence: {
message: "O estado é necessário."
},
},
city:{
presence: {
message: "A cidade é necessária."
},
},
state:{
presence: {
message: "O estado é necessário."
},
}
}
The text was updated successfully, but these errors were encountered:
I think I'm being bit by this as well. The relationship has a value but when ember-model-validator tries to get ${property}.content that comes out empty. Were you able to find a workaround @wallacyalva ? Thanks!
I'm on ember/cli/data 3.28 with ember-model-validator 4.7
EDIT: After a few more rounds of research it seems I have a specific situation(?) the relations that aren't being validated have this particular validation definition:
If I switch to a custom validation that checks something... it seems to work now 🤷
But this used to work fine in 3.X :)
EDIT2: After testing out my app I've found a instance of having only presence:true for a model and ember-model-validator telling me that the content does not exist (but it's there)
validate my relation is presence but is not validate .
i try validate a computed relation id is it working, probably it is check relation but is not checked a content of relation
The text was updated successfully, but these errors were encountered: