(rough-cut for Backbone Fundamentals)
As we learned earlier in the book, the validate
method on a Model is called before set
and save
, and is passed the model attributes updated with the values from these methods.
By default, where we define a custom validate
method, Backbone passes all of a Model's attributes through this validation each time, regardless of which model attributes are being set.
This means that it can be a challenge to determine which specific fields are being set or validated without being concerned about the others that aren't being set at the same time.