Skip to content

Commit

Permalink
feat: allow toggling strict() (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
vonagam authored and jquense committed Feb 10, 2019
1 parent 51e8661 commit 851d421
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},

Expand All @@ -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;
},

Expand Down

0 comments on commit 851d421

Please sign in to comment.