TypescriptZod
Zod Validations
Some things to know with refine
and superRefine
-
Checkings in
refine
andsuperRefine
will only run only if there are not invalid type error anymore on the base schema level.The refine checking will only run if
identity_type
is one ofID_CARD
orPASSPORT
. It will not run ifidentity_type
is still empty or undefined (invalid_type error).