We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form
官方文档版本(2.72.1)
https://semi.design/zh-CN/input/form#%E9%85%8D%E7%BD%AE%E5%88%9D%E5%A7%8B%E5%80%BC%E4%B8%8E%E6%A0%A1%E9%AA%8C%E8%A7%84%E5%88%99 打开semi文档的表单组件,浏览“配置初始值与校验规则”部分。
点击提交,表单shortcut项报错: should be semi
选中表单name项的输入框,并清除内容
编辑shortcut项为semi,报错内容消失。
点击提交,表单无反应
第4步点击提交时,name字段下方提示错误信息: required error
上方现状部分已介绍清楚
// 粘贴自官方文档 import React from 'react'; import { Form, Button } from '@douyinfe/semi-ui'; () => { const initValues = { name: 'semi', shortcut: 'se' }; const style = { width: '100%' }; const { Select, Input } = Form; return ( <Form initValues={initValues} onSubmit={(values)=>{console.log('values', values)}}> <Input field="name" style={style} trigger='blur' rules={[ { required: true, message: 'required error' }, { type: 'string', message: 'type error' }, { validator: (rule, value) => value === 'semi', message: 'should be semi' }, { validator: (rule, value) => value && value.startsWith('se'), message: 'should startsWith se' } ]} /> <Input field="shortcut" style={style} stopValidateWithError rules={[ { required: true, message: 'required error' }, { type: 'string', message: 'type error' }, { validator: (rule, value) => value === 'semi', message: 'should be semi' }, { validator: (rule, value) => value && value.startsWith('se'), message: 'should startsWith se' } ]} /> <Button htmlType='submit'>提交</Button> </Form> ); };
- OS: MacOS Ventura - browser: Chrome
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there an existing issue for this?
Which Component
Form
Semi Version
官方文档版本(2.72.1)
Current Behavior
https://semi.design/zh-CN/input/form#%E9%85%8D%E7%BD%AE%E5%88%9D%E5%A7%8B%E5%80%BC%E4%B8%8E%E6%A0%A1%E9%AA%8C%E8%A7%84%E5%88%99
打开semi文档的表单组件,浏览“配置初始值与校验规则”部分。
点击提交,表单shortcut项报错: should be semi
选中表单name项的输入框,并清除内容
编辑shortcut项为semi,报错内容消失。
点击提交,表单无反应
Expected Behavior
第4步点击提交时,name字段下方提示错误信息: required error
Steps To Reproduce
上方现状部分已介绍清楚
ReproducibleCode
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: