Merge pull request '查看加密信息-电话验证' (#28) from durian/forgeplus-react:dev_military_notice_xiesi into dev_military_notice

This commit is contained in:
tongChong 2021-09-26 14:28:59 +08:00
commit b080df1449
1 changed files with 10 additions and 1 deletions

View File

@ -148,7 +148,16 @@ export default Form.create()(({ match, history, showNotification, form }) => {
{
helper('联系方式',
'contactInfo',
[{ required: true, message: "请输入联系方式" }, { max: 100, message: '不能超过100字符' }],
[{ required: true, message: "请输入联系方式" },
{ max: 100, message: '不能超过100字符' },
{ validator: (rule,val,callback) =>{
var pattern = /^((\+)?86|((\+)?86)?)0?1[3458]\d{9}$/;
if(pattern.test(val)){
callback();
}else {
callback('请输入正确的联系方式!');
}
}}],
<Input
placeholder="请输入联系方式"
/>