Form Validation 2 component design & features
This example applies zod min and max on string fields so FieldError reports too short or too long input via Controller fieldState. FieldDescription can echo limits matching schema numbers.
Length validation protects usernames, promo codes, and bios with database limits. Client messages should match server rules to avoid surprise rejections after submit.
