I use spine plugins for the recognition of model areas. I like the great declarative way of verification, which introduces the plugin. What I am missing is not the way to validate the specific area, but the whole model This is what I want to do:
var SomeModel = backbone.model.extend ({verification: {field1: {required: true}, field 2: {required: true}, Field 3: {Required: true} 'Absolute model': function () {// This method provides some complex verification logic and is expected to be a model every time (some fields)}}};
< / Pre>While using spinal cord I can make it easier. Validity plugin, but when I am using it, how can I do this?
You can do this, look here:
"You can manually call without any parameters to validate the entire model."
Backbone behind the plug-in screen.model.prototype.Write overwrite If you declare all your rules and call model Instance.validate ()
, then all properties should be validated.
Comments
Post a Comment