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
But this fails because model.set calls validate before parsing my object. This doesn't make a whole lot of sense to me. If I say {parse: true} it should parse before validating. My workaround is
varo={a: {a:3}};model.set(model.parse(o));
But I feel like it would be less confusing to have {parse: true} actually work as expected when you have a validate function.
The text was updated successfully, but these errors were encountered:
If I have a Backbone model that expects a wrapped object from the API e.g.
{a: {a: 3}}
But I want to work with it as
{a:3}
It is nice to use parse like
And validate like
And when I mock out the model in a test I do:
But this fails because model.set calls validate before parsing my object. This doesn't make a whole lot of sense to me. If I say {parse: true} it should parse before validating. My workaround is
But I feel like it would be less confusing to have {parse: true} actually work as expected when you have a validate function.
The text was updated successfully, but these errors were encountered: