Comparing version 2.6.0 to 2.6.1
@@ -40,4 +40,11 @@ /// <reference path="String.js"/> | ||
toError: function () { | ||
if (this.reason.property) return new Error(String.format('Failed to validate, expected value of {0} to be a {1} but got {2}', this.reason.property, this.reason.expected, this.reason.got || 'nothing')); | ||
return new Error(String.format('Failed to validate, expected {0} but got {1}', this.reason.expected, this.reason.got || 'nothing')); | ||
var error = null; | ||
if (this.reason.property) error = new Error(String.format('Failed to validate, expected value of {0} to be a {1} but got {2}', this.reason.property, this.reason.expected, this.reason.got || 'nothing')); | ||
else error = Error(String.format('Failed to validate, expected {0} but got {1}', this.reason.expected, this.reason.got || 'nothing')); | ||
error.isValidationError = true; | ||
error.property = this.reason.property; | ||
error.expected = this.reason.expected; | ||
error.got = this.reason.got; | ||
return error; | ||
} | ||
@@ -44,0 +51,0 @@ }; |
{ | ||
"name": "iridium", | ||
"version": "2.6.0", | ||
"version": "2.6.1", | ||
"author": "Benjamin Pannell <admin@sierrasoftworks.com>", | ||
@@ -5,0 +5,0 @@ "description": "A custom lightweight ORM for MongoDB designed for power-users", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
314857
6284