You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constlongStringZod=z.string().refine((val)=>val.length>10,{error: (iss)=>`${iss.input} is not more than 10 characters`,});
But in your case I would use :
constlongStringZod=z.string().min(10,{error: (iss)=>`${iss.input} is not more than 10 characters`,});
or with @zod/mini :
import*aszMinifrom"@zod/mini";constlongStringZodMini=zMini.string().check(zMini.minLength(10,{error: (iss)=>`${iss.input} is not more than 10 characters`,}),);
This ability is mentioned in the v3 docs:
I couldn't find any mentions of this change in the migration guide so I assume it was unintentional.
The text was updated successfully, but these errors were encountered: