feat: added max to search or

This commit is contained in:
=
2025-04-09 22:04:31 +05:30
parent 1f23515aac
commit 9356ab7cbc

View File

@@ -39,5 +39,5 @@ export type TSearchResource = {
};
export const buildSearchZodSchema = <T extends TSearchResource>(schema: z.ZodObject<T>) => {
return schema.extend({ $or: schema.array().optional() }).optional();
return schema.extend({ $or: schema.array().max(5).optional() }).optional();
};