We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
model.clear() does not work when model does not pass validation: https://github.com/afeld/backbone-nested/blob/master/backbone-nested.js#L118-L120
model.clear()
this.validate
The text was updated successfully, but these errors were encountered:
Just bumped into to this issue myself - doesn't make any sense ...
Sorry, something went wrong.
We just noticed this too. It does seem a bit odd, but after some further investigation it's actually replicating existing Backbone behaviour:
Backbone.Model.prototype.clear() will run Backbone.Model.prototype.set(), which will validate the model before setting.
Backbone.Model.prototype.clear()
Backbone.Model.prototype.set()
You can get past this by passing the validate option as false:
validate
false
someNestedModel.clear({validate: false});
No branches or pull requests
model.clear()
does not work when model does not pass validation:https://github.com/afeld/backbone-nested/blob/master/backbone-nested.js#L118-L120
this.validate
is supposed to return undefined. What is the reason behind this check?The text was updated successfully, but these errors were encountered: