Closed vladflorescu closed 1 year ago
as of v1
required means not null
and not undefined
, required()
will undo a nullable()
call, please see: https://github.com/jquense/yup/issues/1906 and others for more info
My bad, I was not aware of these changes. Sorry for the confusion and thank your for the clarifications!
InferType
does not recognizenull
as a correct type fornullable
schemas that are also required.This issue happended previously when the types were on DefinitelyTyped, but was fixed in this PR. Looks like at some point the
required
behaviour was changed again here.