Comparing version 0.17.6 to 0.18.0
@@ -0,1 +1,8 @@ | ||
v0.18.0 - Sat, 23 Apr 2016 01:20:27 GMT | ||
--------------------------------------- | ||
- [f827822](../../commit/f827822) [changed] validate() on objects won't cast nested schema with strict() | ||
v0.17.6 - Thu, 21 Apr 2016 14:59:59 GMT | ||
@@ -2,0 +9,0 @@ --------------------------------------- |
@@ -99,3 +99,3 @@ 'use strict'; | ||
var innerOptions = _extends({}, opts, { parent: {} }); | ||
var innerOptions = _extends({}, opts, { parent: {}, __validating: false }); | ||
@@ -109,5 +109,7 @@ value = transform(props, function (obj, prop) { | ||
var strict = field._options && field._options.strict; | ||
if (field._strip === true) return; | ||
fieldValue = field.cast(value[prop], innerOptions); | ||
fieldValue = !opts.__validating || !strict ? field.cast(value[prop], innerOptions) : value[prop]; | ||
@@ -132,2 +134,4 @@ if (fieldValue !== undefined) obj[prop] = fieldValue; | ||
opts = _extends({}, opts, { __validating: true }); | ||
return MixedSchema.prototype._validate.call(this, _value, opts).catch(endEarly ? null : function (err) { | ||
@@ -134,0 +138,0 @@ errors.push(err); |
{ | ||
"name": "yup", | ||
"version": "0.17.6", | ||
"version": "0.18.0", | ||
"description": "Dead simple Object schema validation", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
106440
1516