refine icon indicating copy to clipboard operation
refine copied to clipboard

feat(antd): form server-side validation

Open alicanerdurmaz opened this issue 2 years ago â€ĸ 4 comments

After the onMutationError callback is triggered, useForm will automatically set the thrown errors to the corresponding form fields. From know, when the dataProvider throws an HttpError with an errors field, the form will display the errors in the appropriate fields. With this feature users can handle server-side validation errors out-of-the-box.

-Ant Design example is added

Documentation Link

Test plan (required)

WIP

Self Check before Merge

Please check all items below before review.

  • [x] Corresponding issues are created/updated or not needed
  • [x] Docs are updated/provided or not needed
  • [x] Examples are updated/provided or not needed
  • [x] TypeScript definitions are updated/provided or not needed
  • [x] Tests are updated/provided or not needed
  • [x] Changesets are provided or not needed

https://refinedev.atlassian.net/jira/software/c/projects/REF/boards/1?modal=detail&selectedIssue=REF-74

alicanerdurmaz avatar Jun 23 '23 13:06 alicanerdurmaz

đŸĻ‹ Changeset detected

Latest commit: 005eb8472d8e54d2e5e92fe9708b11b014c9fd62

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Jun 23 '23 13:06 changeset-bot[bot]

â˜ī¸ Nx Cloud Report

CI is running/has finished running commands for commit 005eb8472d8e54d2e5e92fe9708b11b014c9fd62. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


đŸŸĨ Failed Commands
lerna run build --include-dependencies --scope @refinedev/core --no-bail --scope=refine-week-invoice-generator --scope=inferencer-graphql-hasura --scope=remix --scope=search --scope=store --scope=inferencer-headless --scope=storybook --scope=table --scope=table-mui-advanced --scope=inferencer-mantine --scope=table-mui-cursor-pagination --scope=tabl...
lerna run build --include-dependencies --scope @refinedev/core --no-bail --scope=with-cypress --scope=table-handson --scope=with-javascript --scope=with-meta-properties --scope=with-persist-query --scope=table-mantine-advanced --scope=with-react-toastify --scope=with-remix-auth --scope=with-remix-mui --scope=table-mantine-basic --scope=with-storybo...
lerna run build --include-dependencies --scope @refinedev/core --no-bail --scope=import-export-material-ui --scope=form-material-ui-use-modal-form --scope=import-export-mui --scope=importExport --scope=inferencer --scope=form-material-ui-use-steps-form --scope=inferencer-mui --scope=input-custom --scope=input-date-picker --scope=form-react-hook-for...
lerna run build --include-dependencies --scope @refinedev/core --no-bail --scope=access-control-casbin --scope=auth-antd --scope=access-control-cerbos --scope=accessControl --scope=antd-audit-log --scope=auth-auth0 --scope=antdAuditLog --scope=audit-log-provider --scope=auditLogProvider --scope=auth-chakra-ui --scope=auth-mui --scope=auth-otp --sco...
lerna run build --include-dependencies --scope @refinedev/core --no-bail --scope=e2e --scope=form-mantine-mutation-mode --scope=field --scope=field-antd-use-checkbox-group --scope=field-antd-use-radio-group --scope=form-mantine-use-drawer-form --scope=field-antd-use-select-basic --scope=field-antd-use-select-infinite --scope=field-material-ui-use-a...
lerna run build --include-dependencies --scope @refinedev/core --no-bail --scope=tutorial-antd --scope=table-antd-advanced --scope=tutorial-chakra-ui --scope=tutorial-headless --scope=tutorial-mantine --scope=table-antd-table-filter --scope=tutorial-material-ui --scope=tutorial-mui --scope=ui --scope=table-antd-use-delete-many --scope=upload --scop...
lerna run build --include-dependencies --scope @refinedev/core --no-bail --scope=blog-ra-chakra-tutorial --scope=base-antd --scope=blog-react-admin-mantine --scope=blog-react-aria --scope=blog-react-dnd --scope=base-chakra-ui --scope=blog-react-hook-dynamic-form --scope=blog-react-memoization-memo --scope=blog-react-toastify --scope=base-mantine --...
lerna run build --include-dependencies --scope @refinedev/core --no-bail --scope=core-use-menu --scope=form-antd-use-drawer-form --scope=core-use-modal --scope=core-use-select --scope=customPages --scope=form-antd-use-form --scope=customization --scope=customization-footer --scope=customization-login --scope=form-antd-use-modal-form --scope=customi...

Sent with 💌 from NxCloud.

nx-cloud[bot] avatar Jun 23 '23 13:06 nx-cloud[bot]

Deploy Preview for refine-doc-live-previews failed.

Name Link
Latest commit 005eb8472d8e54d2e5e92fe9708b11b014c9fd62
Latest deploy log https://app.netlify.com/sites/refine-doc-live-previews/deploys/64ac17fca78497000859d075

netlify[bot] avatar Jun 23 '23 13:06 netlify[bot]

Passing run #9417 â†—ī¸Ž

0 409 18 0 Flakiness 0

Details:

Merge 47d318c08bdc887669eccb9e859479b008c2756a into dbae61f580edf52fd2cc9676bbed...
Project: refine Commit: aed914b91b â„šī¸
Status: Passed Duration: 36:51 💡
Started: Jun 23, 2023 5:42 PM Ended: Jun 23, 2023 6:19 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

cypress[bot] avatar Jun 23 '23 15:06 cypress[bot]