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
Hello!
With model.set I want to change my model, but I do not want events triggered, so I call "model.set" with silent=true.
But with this the validate function is not called.
Why?
Thanks alot
Wolfgang
current Backbone.js source code (0.5.3)
( set : function(key, value, options) {
...
// Run validation.
if (!options.silent && this.validate && !this._performValidation(attrs, options)) return false;)
The text was updated successfully, but these errors were encountered:
Because the point of silent changes is that you're allowed to twiddle with the internal state of your model, temporarily, without actually making a change. Later, when the attribute actually changes, the validation runs and events are emitted. It wouldn't make sense to emit an error event when making a silent change.
Hello!
With model.set I want to change my model, but I do not want events triggered, so I call "model.set" with silent=true.
But with this the validate function is not called.
Why?
Thanks alot
Wolfgang
current Backbone.js source code (0.5.3)
( set : function(key, value, options) {
...
// Run validation.
if (!options.silent && this.validate && !this._performValidation(attrs, options)) return false;)
The text was updated successfully, but these errors were encountered: