backbone: fix syntax error

This commit is contained in:
Rico Sta. Cruz 2017-09-04 10:46:34 +08:00
parent 7fbe70abcf
commit adc21db20f
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 2 additions and 2 deletions

View File

@ -217,7 +217,7 @@ obj.fetch({ success: callback, error: callback })
var Model = Backbone.Model.extend({
validate: function(attrs, options) {
if (attrs.end < attrs.start) {
return 'Can't end before it starts'
return "Can't end before it starts"
}
}
})
@ -225,7 +225,7 @@ var Model = Backbone.Model.extend({
{: data-line="2"}
```js
obj.validationError //=> 'Can't end before it starts'
obj.validationError //=> "Can't end before it starts"
obj.isValid()
obj.on('invalid', function (model, error) { ··· })
```