如何给Form设置自定义的错误提示信息? #5496
SyuTingSong
started this conversation in
General
Replies: 1 comment 2 replies
-
https://codesandbox.io/s/sweet-jasper-hpvdiz?file=/src/App.tsx
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
前端检查都过了,但总有一些检查工作是服务端执行的,比如注册时账号已经存在,还有填写的内容没有通过敏感词检查等等。现在服务端返回了errors对象,提供了服务端检查没通过的表单字段名和对应的错误信息,如何才能把这些消息设置到Form组件中,让它们显示在对应字段的Form.Item错误提示区?
Beta Was this translation helpful? Give feedback.
All reactions