lundi 4 avril 2016

Ember-data: validation errors on relationships (hasMany)

I'm trying to create record with associated records in one request. In case if some of nested records have validation errors, I'd like to access appropriate errors on that record. I'm using json-api adaptor, so what should be the format of errors from the backend? I'm trying something like this, with no luck though:

{"errors":[
  {
    "detail": "can't be blank",
    "source": {
      "pointer":"data/relationships/steps/0/data/attributes/est_threshold"
    }
  }
}

According to this line, it should be implemented somehow: http://ift.tt/1ovvXjP

Any ideas?




Aucun commentaire:

Enregistrer un commentaire