# React Typescript

**URL:** https://forum.codewithmosh.com/t/react-typescript/71783
**Category:** Uncategorized
**Created:** [November 7, 2025, 2:12pm UTC](https://forum.codewithmosh.com/t/react-typescript/71783 "2025-11-07T14:12:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![RSA](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@RSA](https://forum.codewithmosh.com/u/RSA)
#### Post date: [November 7, 2025, 2:12pm UTC](https://forum.codewithmosh.com/t/react-typescript/71783/1 "2025-11-07T14:12:58Z")

</div>

zod validation errror with enums:  
category: z.enum([“Groceries”, “Utilities”, “Entertainment”], {errorMap: () =\> ({ message: “Category is required.” }), }),});

and categories are  
const categories = [“Groceries”, “Utilities”, “Entertainment”] as const;  
export default categories;

I get  
Overload 1 of 2, ‘(values: readonly [“Groceries”, “Utilities”, “Entertainment”], params?: string | { error?: string | $ZodErrorMap\<$ZodIssueInvalidValue\> | undefined; message?: string | undefined; } | undefined): ZodEnum\<…\>’, gave the following error.  
Any help will be greatly appreciated.

---

<div class="post-metadata">

### Author: ![theorion](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/theorion/32/7783_2.png) [@theorion](https://forum.codewithmosh.com/u/theorion)
#### Post date: [November 7, 2025, 8:23pm UTC](https://forum.codewithmosh.com/t/react-typescript/71783/2 "2025-11-07T20:23:44Z")

</div>

There is some deprecated zod code if you used the latest version. I would search zod in the forms and look through the many threads on other issues to see if you can get context or find the exact issue if you have not. Otherwise paste the code you used or put a screenshot.
