From 010d97d35f90156f9684b4621f14758a760bea5a Mon Sep 17 00:00:00 2001 From: "AriFe.Liu" <88468560@qq.com> Date: Thu, 27 May 2021 17:17:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E5=88=99=E9=AA=8C=E8=AF=81ip=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F=E4=BF=AE=E6=94=B9,=E7=AB=AF=E5=8F=A3?= =?UTF-8?q?=E5=8F=B7=E5=88=A4=E5=AE=9A=E5=A2=9E=E5=8A=A0=E5=88=B05?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/utils/regular/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/utils/regular/index.js b/src/renderer/utils/regular/index.js index a9db87a..793ae9a 100644 --- a/src/renderer/utils/regular/index.js +++ b/src/renderer/utils/regular/index.js @@ -22,7 +22,7 @@ const Regular = (function () { return (/^[A-Z]+$/).test(str) }, ip(str) { - return (/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(:\d{4})?$/).test(str) + return (/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(:\d{5})?$/).test(str) } }