Hi guys, I'm new to Arktype, I'm switching from Zod to Arktype with this code:
export const TestSchema = z.object({ companyName: z .string() .min(2, "Company name must be at least 2 characters") .max(50, "Company name must be less than 50 characters"), companyId: z .string() .min(2, "Company ID must be at least 2 characters") .max(50, "Company ID must be less than 50 characters"), agreement: z.boolean(),});
export const TestSchema = z.object({ companyName: z .string() .min(2, "Company name must be at least 2 characters") .max(50, "Company name must be less than 50 characters"), companyId: z .string() .min(2, "Company ID must be at least 2 characters") .max(50, "Company ID must be less than 50 characters"), agreement: z.boolean(),});
However, I'm not sure how to set a custom message. All of the documents refer to only one variable. https://arktype.io/docs/configuration#errors. Is there any way to set the error message for best practices?