Closed Emerson closed 9 years ago
@Emerson When this is happening ? I cannot reproduce..
I also noticed this behavior, and I posted an issue to ember data: https://github.com/emberjs/data/issues/2604. There's an jsbin example you can look at.
Basically when you use errorsFor
or errors.get("[attributeName]")
you don't get an array with error messages, you get an array with objects just like @Emerson posted above.
I would love to see this merged!
Any plan on supporting DS.Errors? Or does anyone have a workaround that doesn't involve modifying ember-forms
code?
@Emerson Thanks, @prikhi pushed!
Hey @asaf,
Migrating to ember-data and ember-cli on my project and noticed that the errors were not displaying properly. I was seeing
[object object]
in my templates instead of the actual error text.I'm not sure if this is a new thing, but it looks like the
DS.Errors
array now has an object for each field error instead of plain text. Assuming we have a post that has a validation error on the title, it would look like this:This small change appears to fix the problem.