Skip to content
This repository
Browse code

Move the ‘except’ attribute into a separate file

  • Loading branch information...
commit c2ea390f5f7c3c8a278e4f6c6a52bd972f75c6e9 1 parent 3cabc0c
František Hába authored March 12, 2012

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. 14  src/engines/json/attributes/except.js
14  src/engines/json/attributes/except.js
... ...
@@ -0,0 +1,14 @@
  1
+/**
  2
+ * Except
  3
+ */
  4
+Validation.prototype.addAttributeConstructor('except', function exceptConstructor() {
  5
+  return function except(property, propertyValue, attributeValue, propertyAttributes, callback) {
  6
+
  7
+    if (attributeValue.indexOf(propertyValue) !== -1) {
  8
+      this.addError('except', property);
  9
+    }
  10
+
  11
+    return callback();
  12
+
  13
+  };
  14
+});

0 notes on commit c2ea390

Please sign in to comment.
Something went wrong with that request. Please try again.