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
After upgrading to Ember Data 1.13 and the new DS.InvalidError format we noticed some real problems with the DS.Errors API. The biggest issue for us is that it's cumbersome to look up an error by it's related field. For example, if the field firstName were to fail validation, I use to be able to do:
This allows each form input element to individually indicated if it's value is invalid and show the related error near by. For example:
This shouldn't really be all that earth shattering right? A lot of apps do this. I think even bootstrap has or had this UI paradigm at some point.
The new DS.Errors API creates several more hops in the lookup process. Now instead of user.errors.firstName I have to look things up via user.errors.firstName.firstObject.message.
There has to be some better solution here right? What is the real world use case for having the errors even be an array? The docs show show iterating the list of errors for a single field, but I don't really understand why this would be the case.
The text was updated successfully, but these errors were encountered:
After upgrading to Ember Data 1.13 and the new DS.InvalidError format we noticed some real problems with the DS.Errors API. The biggest issue for us is that it's cumbersome to look up an error by it's related field. For example, if the field
firstName
were to fail validation, I use to be able to do:This allows each form input element to individually indicated if it's value is invalid and show the related error near by. For example:
This shouldn't really be all that earth shattering right? A lot of apps do this. I think even bootstrap has or had this UI paradigm at some point.
The new DS.Errors API creates several more hops in the lookup process. Now instead of
user.errors.firstName
I have to look things up viauser.errors.firstName.firstObject.message
.So this:
becomes:
There has to be some better solution here right? What is the real world use case for having the errors even be an array? The docs show show iterating the list of errors for a single field, but I don't really understand why this would be the case.
The text was updated successfully, but these errors were encountered: