vine
vine copied to clipboard
Validation for undefined only
Hi, is there any way to explicitly specify that a field can only be undefined and not null ? In the current implementation optional() considers null as valid too, although there is nullable() for this purpose
I am also struggling with this. I am trying to extend Tuyau's experimental openapi generator, and this is giving me a headache.
optional() js docs say An optional field allows both null and undefined values.
nullable() js docs says If optional and nullable are used together, then both undefined and null values will be allowed.
So I am not understanding the difference.