Repository navigation
Patch version 1.0.1
Fix minor issue related to optional properties not allowing null.
Example:
const schema = ObjectSchema.create()
.withProperty("req", ObjectSchema.string().withDefaultValue(""))
.withProperty("opt", ObjectSchema.optional(ObjectSchema.string().withDefaultValue("")));
expect(schema.test({ req: "Example Required", opt: "Example Optional" })).to.be.true;
expect(schema.test({ req: "Example Required" })).to.be.true;
expect(schema.test({ req: "Example Required", opt: null})).to.be.true; // Before the fix, this was false