Commit 1c772b85 authored by 张子雨's avatar 张子雨

Merge branch 'feat/constructionOne' into feature/20230327_public_takeaway

* feat/constructionOne:
  feat: 增加校验规则
parents 16e7beae 8d2dd0b9
......@@ -19,6 +19,7 @@ import {
notification,
Spin,
Tabs,
InputNumber,
} from 'antd';
import styles from './style.less';
import {
......@@ -453,9 +454,12 @@ class BusinessInfo extends Component {
<Col span={12}>
<FormItem label="联系人姓名" labelCol={{ span: 8 }}>
{getFieldDecorator('contactName', {
rules: [{ required: true, message: '请输入联系人姓名!' }],
rules: [
{ required: true, message: '请输入联系人姓名!' },
{ pattern: /^[A-Za-z\u4e00-\u9fa5]+$/, message: '请输入汉字或字母!' },
],
initialValue: businessInfo.contactName,
})(<Input maxLength={8} />)}
})(<Input />)}
</FormItem>
</Col>
<Col span={12}>
......@@ -608,9 +612,12 @@ class BusinessInfo extends Component {
<Col span={12}>
<FormItem label="统一社会信用代码" labelCol={{ span: 8 }}>
{getFieldDecorator('socialCode', {
rules: [{ required: true, message: '请输入统一社会信用代码!' }],
rules: [
{ required: true, message: '请输入统一社会信用代码!' },
{ pattern: /^[A-Za-z0-9]*$/, message: '仅支持输入数字和字母' },
],
initialValue: businessInfo.socialCode,
})(<Input maxLength={32} />)}
})(<Input maxLength={18} />)}
</FormItem>
</Col>
{(!companyNamedis &&
......@@ -813,7 +820,10 @@ class BusinessInfo extends Component {
<Col span={12}>
<FormItem label="身份证号码" labelCol={{ span: 8 }}>
{getFieldDecorator('legalPersonIdCard', {
rules: [{ required: true, message: '请输入身份证号码!' }],
rules: [
{ required: true, message: '请输入身份证号码!' },
{ pattern: /^[A-Za-z0-9]*$/, message: '请输入数字或字母' },
],
initialValue: businessInfo.legalPersonIdCard,
})(<Input maxLength={18} />)}
</FormItem>
......@@ -970,7 +980,7 @@ class BusinessInfo extends Component {
{getFieldDecorator('bankAccount', {
rules: [{ required: true, message: '请输入银行帐号!' }],
initialValue: businessInfo.bankAccount,
})(<Input maxLength={20} />)}
})(<InputNumber style={{ width: '100%' }} controls={false} min={1} />)}
</FormItem>
</Col>
<Col span={12}>
......@@ -1053,7 +1063,7 @@ class BusinessInfo extends Component {
{getFieldDecorator('bankAccount', {
rules: [{ required: true, message: '请输入银行帐号!' }],
initialValue: businessInfo.bankAccount,
})(<Input maxLength={20} />)}
})(<InputNumber style={{ width: '100%' }} controls={false} min={1} />)}
</FormItem>
</Col>
</Row>
......@@ -1114,7 +1124,7 @@ class BusinessInfo extends Component {
{getFieldDecorator('bankAccount', {
rules: [{ required: true, message: '请输入银行帐号!' }],
initialValue: businessInfo.bankAccount,
})(<Input maxLength={20} />)}
})(<InputNumber style={{ width: '100%' }} controls={false} min={1} />)}
</FormItem>
</Col>
</Row>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment