Skip to content
Browse files

Rename ‘error.js’ to ‘validationError.js’

  • Loading branch information...
1 parent a79a212 commit 37895bde7bc96d0eeedcc0411afaf3d0c26b6cd9 @Baggz committed
Showing with 13 additions and 31 deletions.
  1. +0 −31 src/engines/json/error.js
  2. +13 −0 src/engines/json/validationError.js
View
31 src/engines/json/error.js
@@ -1,31 +0,0 @@
-/**
- * ValidationError
- *
- * @constructor
- */
-var ValidationError = function() {
- this.length = 0;
-};
-
-/**
- * Error
- *
- * Adds a new error to the ‘Error’ instance.
- *
- * @param {object} error
- */
-ValidationError.prototype.addError = function(error) {
- this[this.length] = error;
- this.length++;
-};
-
-// Generates the ‘getProperties’ and the ‘getMessages’ method
-each({
- getProperties: 'property',
- getMessages: 'message'
-}, function(key, value) {
- ValidationError.prototype[key] = function() {
- return pluck(this, value);
- };
-});
-
View
13 src/engines/json/validationError.js
@@ -0,0 +1,13 @@
+/**
+ * Error
+ *
+ * @constructor
+ */
+var ValidationError = function() {
+ this.length = 0;
+};
+
+ValidationError.prototype.push = function(item) {
+ this[this.length] = item;
+ this.length += 1;
+};

0 comments on commit 37895bd

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