Closed GravlLift closed 3 months ago
Describe the bug The README describes the defined operation as:
defined
Require a value for the schema. All field values apart from undefined meet this requirement.
Despite this, the value of null is not valid.
To Reproduce
string().defined().isValid(null); // false
Expected behavior null is not undefined, so by the language of the readme, the reproduction should return true.
null
undefined
Platform (please complete the following information):
schema's are non-nullable by default, the defined only controls whether undefined is allowed. if you want to allow nulls use schema.nullable()
schema.nullable()
Describe the bug The README describes the
defined
operation as:Despite this, the value of null is not valid.
To Reproduce
Expected behavior
null
is notundefined
, so by the language of the readme, the reproduction should return true.Platform (please complete the following information):