jeudi 15 juin 2017

how can we get from the error validations object the modelName info for each attribute, if two models have two attributes with the same name?

I am using ember-cp-validations for form validations on Emberjs project.

The issue is:-

I have two models with has-many relationship, and both models have attributes with the same name (ex:- "title") .. when I get the "validation.errors" I get an array which contains two validation objects for both "title" of the first model and "title" of the second model.

The question is how can I get the modelName where each one of the "title"s belong to?




Aucun commentaire:

Enregistrer un commentaire