From d31bd5a0ccb1e11548fe641508682944b219fd91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E6=98=8E=E9=94=8B?= Date: Fri, 6 Sep 2024 08:55:05 +0800 Subject: [PATCH] =?UTF-8?q?wip:=20=E6=89=8B=E6=9C=BA=E5=8F=B7=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=94=AF=E6=8C=8119x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/OSharp.Utils/Extensions/StringExtensions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OSharp.Utils/Extensions/StringExtensions.cs b/src/OSharp.Utils/Extensions/StringExtensions.cs index 733b5e1b..45ad3261 100644 --- a/src/OSharp.Utils/Extensions/StringExtensions.cs +++ b/src/OSharp.Utils/Extensions/StringExtensions.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) 2014 OSharp. All rights reserved. // @@ -327,7 +327,7 @@ public static bool IsIdentityCardId(this string value) /// 是否按严格格式验证 public static bool IsMobileNumber(this string value, bool isRestrict = false) { - string pattern = isRestrict ? @"^[1][3-8]\d{9}$" : @"^[1]\d{10}$"; + string pattern = isRestrict ? @"^1[3-9]\d{9}$" : @"^1\d{10}$"; return value.IsMatch(pattern); } @@ -956,4 +956,4 @@ public static double GetSimilarityWith(this string source, string target, bool i #endregion } -} \ No newline at end of file +}