From 580f2d29b686a8e0d159919feef5869638fd8b7c Mon Sep 17 00:00:00 2001 From: "wenbo.dong" Date: Fri, 25 Aug 2017 11:33:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=9F=9F=E5=90=8D=E7=9A=84=E6=AD=A3=E5=88=99=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Project/Setting/ProjectMessage/ProjectMessage.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js b/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js index 2bc51c91..ea544481 100644 --- a/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js +++ b/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js @@ -266,16 +266,16 @@ class ProjectMessage extends Component { validator(rule, value, callback) { if (value) { if (value.length === 0) { - callback('请输入环境域名'); - } else if (!/\S/.test(value)) { - callback('请输入环境域名'); - } else if (!/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$/.test(value)) { - callback('域名格式错误'); + callback('请输入环境域名!'); + } else if (/\s/.test(value)) { + callback('环境域名不允许出现空格!'); + } else if (/\//.test(value)) { + callback('环境域名不允许出现‘\/’!'); } else { return callback(); } } else { - callback('请输入环境域名'); + callback('请输入环境域名!'); } } }]