efficient-indigoE
Refine2y ago
6 replies
efficient-indigo

How to change default error message in useForm

The default error message Error when updating <resource-name> (status code: ${err.statusCode})" or "Error when creating <resource-name> (status code: ${err.statusCode}) is not terribly helpful to users. I'd like to change it to the message my API responds with. How can I do this on a global level (instead of repeating it each time I use
useForm
?
https://refine.dev/docs/packages/react-hook-form/use-form/#errornotification
useForm is used to manage forms. It returns the necessary properties and methods to control the element. It has been developed by using useForm imported from the @refinedev/core package.
useForm | Refine
Was this page helpful?