Welcome aboard! We are happy you are here and wish you good net-raft!
<script type="text/javascript">
var Rank = Backbone.Model.extend({
defaults: {
lang: '',
rank: 3,
},
validate: function(attributes) {
if (attributes.lang == '') {
document.write("Please enter the language name!");
}
}
});
var rank = new Rank();
rank.set({ rank : 5}, { validate : true });
document.write(" The set value is: ", rank.get("rank"));
</script>
The most helpful BACKBONE.JS solutions
How to get country from client ip address using backbonejs ?BACKBONE.JS Click to see more ... 945 84