Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

An additional way to skip validation besides options.silent

  • Loading branch information...
commit f934eb4624490d1f3d1adb481a0f1f4a943140c6 1 parent 2ea2610
@bergie authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/Entity.js
View
9 src/Entity.js
@@ -200,7 +200,16 @@ VIE.prototype.Entity = function(attrs, opts) {
return Backbone.Model.prototype.unset.call(this, attr, opts);
},
+ // Validation based on type rules.
+ //
+ // There are two ways to skip validation for entity operations:
+ //
+ // * `options.silent = true`
+ // * `options.validate = false`
validate: function (attrs, opts) {
+ if (opts.validate === false) {
+ return;
+ }
var types = this.get('@type');
if (_.isArray(types)) {
var results = [];
Please sign in to comment.
Something went wrong with that request. Please try again.