how can I show customized error messaged from server side validation in React Admin package?

后端 未结 4 1417
栀梦
栀梦 2020-12-16 18:22

Is there any way to perform server side form validation using https://github.com/marmelab/react-admin package?

Here\'s the code for AdminCreate Component. It sends c

4条回答
  •  春和景丽
    2020-12-16 18:52

    Here one more solution from official repo. https://github.com/marmelab/react-admin/pull/871 You need to import HttpError(message, status, body) in DataProvider and throw it. Then in errorSaga parse body to redux-form structure. That's it. Enjoy.

提交回复
热议问题