From 83d48e3a2a048dc39e6e58125ea685ccadd2dd20 Mon Sep 17 00:00:00 2001 From: Dmitry Maganov Date: Sun, 10 Feb 2019 13:28:16 +0300 Subject: [PATCH] feat: allow undo strict() --- src/mixed.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mixed.js b/src/mixed.js index 27f781cc9..cd16842b8 100644 --- a/src/mixed.js +++ b/src/mixed.js @@ -296,9 +296,9 @@ const proto = (SchemaType.prototype = { return next; }, - strict() { + strict(isStrict = true) { var next = this.clone(); - next._options.strict = true; + next._options.strict = isStrict; return next; }, @@ -312,9 +312,9 @@ const proto = (SchemaType.prototype = { return next; }, - nullable(value) { + nullable(isNullable = true) { var next = this.clone(); - next._nullable = value === false ? false : true; + next._nullable = isNullable; return next; },