simpl-schema
Advanced tools
Comparing version 1.6.2 to 1.7.0
@@ -133,5 +133,5 @@ "use strict"; | ||
value: val, | ||
// Value checks are not necessary for null or undefined values, | ||
// except for null array items, or for $unset or $rename values | ||
valueShouldBeChecked: op !== '$unset' && op !== '$rename' && (val !== undefined && val !== null || affectedKeyGeneric.slice(-2) === '.$' && val === null) | ||
// Value checks are not necessary for null or undefined values, except | ||
// for non-optional null array items, or for $unset or $rename values | ||
valueShouldBeChecked: op !== '$unset' && op !== '$rename' && (val !== undefined && val !== null || affectedKeyGeneric.slice(-2) === '.$' && val === null && !def.optional) | ||
}, extendedCustomContext || {}); | ||
@@ -138,0 +138,0 @@ |
{ | ||
"name": "simpl-schema", | ||
"version": "1.6.2", | ||
"version": "1.7.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>", |
@@ -632,3 +632,3 @@ # SimpleSchema (simpl-schema NPM package) | ||
- If `type` is `Array`, then "required" means that key must have a value, but an empty array is fine. (If an empty array is *not* fine, add the `minCount: 1` option.) | ||
- For array items (when the key name ends with ".$"), the `optional` option has no effect. That is, something cannot be "required" to be in an array. | ||
- For array items (when the key name ends with ".$"), if `optional` is true, then `null` values are valid. If array items are required, then any `null` items will fail the type check. | ||
- If a key is required at a deeper level, the key must have a value *only if* the object it belongs to is present. | ||
@@ -716,3 +716,3 @@ - When the object being validated is a Mongo modifier object, changes that would unset or `null` a required key result in validation errors. | ||
- `SimpleSchema.RegEx.idOfLength(min, max)` for IDs generated by `Random.id(length)` where min/max define lower and upper bounds. | ||
Call without params for allowing an arbitrary length. Call with `min` only for fixed length. | ||
Call without params for allowing an arbitrary length. Call with `min` only for fixed length. | ||
Call with `max = null` for fixed lower and arbitrary upper bounds. | ||
@@ -719,0 +719,0 @@ - `SimpleSchema.RegEx.ZipCode` for 5- and 9-digit ZIP codes |
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
197098