jeudi 14 janvier 2016

Handling errors with the Ember Data JSON-API adapter

Errors on attributes located within related models is now my problem. I can see the errors on these related models by doing model.errors.content or model.errors.messages but if I want to check a particular attribute on a related model in order to highlight field errors I get null or undefined values.

See below screen shot for more info

Invaild Error object: enter image description here

Model After error: In this object i am getting the attribute and message but i use model.get("errors.phone"

enter image description here




Aucun commentaire:

Enregistrer un commentaire