Zod type email string and number message not working correctly
Hey guys i am facing a issue i am also new to typescript
i am using this type for react-hooks-forms and i want the email to either be string or number and when it is number show Invalid number message and when incorrect email message but it is only showing email message everytime how can i achive something like this
2 Replies
if input type is text you will phone number in string format you need to convert it transform it to a number before checking it