simpl-schema
Advanced tools
Comparing version 1.8.1 to 1.9.0
@@ -679,3 +679,3 @@ "use strict"; | ||
if (!this._validationContexts[name]) { | ||
this._validationContexts[name] = new _ValidationContext.default(this); | ||
this._validationContexts[name] = new _ValidationContext.default(this, name); | ||
} | ||
@@ -682,0 +682,0 @@ |
@@ -23,3 +23,7 @@ "use strict"; | ||
function () { | ||
function ValidationContext(ss) { | ||
/** | ||
* @param {SimpleSchema} ss SimpleSchema instance to use for validation | ||
* @param {String} [name] Optional context name, accessible on context.name. | ||
*/ | ||
function ValidationContext(ss, name) { | ||
var _this = this; | ||
@@ -29,2 +33,3 @@ | ||
this.name = name; | ||
this._simpleSchema = ss; | ||
@@ -31,0 +36,0 @@ this._schema = ss.schema(); |
{ | ||
"name": "simpl-schema", | ||
"version": "1.8.1", | ||
"version": "1.9.0", | ||
"description": "A schema validation package that supports direct validation of MongoDB update modifier objects.", | ||
@@ -5,0 +5,0 @@ "author": "Eric Dobbertin <aldeed@gmail.com>", |
@@ -1164,2 +1164,4 @@ # SimpleSchema (simpl-schema NPM package) | ||
`myContext.name` is set to the context name, if it is a named context. Create named contexts by calling `schema.namedContext(name)` or `new ValidationContext(schema, name)`. | ||
## Other SimpleSchema Methods | ||
@@ -1166,0 +1168,0 @@ |
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
198431
2887
1381