Customise Yup’s default error messages
17 March 2022 (Updated 26 October 2023)
Add the following code somewhere (e.g., src/bootstrap.ts
):
Then make sure this code runs before you use start using Yup elsewhere. For example, you might put the setLocale
call in a src/bootstrap.ts
file and then include src/bootstrap.ts
near the top of a src/App.tsx
.
Sources
Tagged:
Yup
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment