I was wondering if there's a way to specify model attributes that must be initialized upon instantiation.
Book = Backbone.Model.extent({
title: "title",
author: "author",
year: "year"
});
and whenever I instantiate the model, I wish to constrain that these few attributes have to be initialized, or at least constrain enough not to be able to set a new attribute:
var book = new Book({
title: "something",
pages: "350"
});