S
S
Stepan2014-08-02 21:02:57
JavaScript
Stepan, 2014-08-02 21:02:57

What does it mean to add to the options hash in Backbone?

I can't figure out where?
It is written that for validation to the model.set method, you need to add {validation: true}

I add

name.set("age", 20, {validation:true})

But it does not work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
antonre, 2014-08-03
@xoma2

Method signature
I suspect that you need to write either this way
or pass it to the constructor
new Model([attributes], {validation:true})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question