Skip to content

Commit 057b2ae

Browse files
committed
Fix PhoneNumber validation
1 parent 1523ce7 commit 057b2ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/KSFramework/Utilities/ValidationExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static bool IsValidEmail(this string email)
2222

2323
public static bool IsValidMobile(this string phone)
2424
{
25-
return Regex.IsMatch(phone, @"^(?:\+?\d{1,3}[.-\s]?)?(?:\(0?\d{1,4}\)|0?\d{1,4})?[.-\s]?\d{1,4}[.-\s]?\d{1,9}$");
25+
return Regex.IsMatch(phone, @"(?:(?:\+|00)?\d{1,4})?[-\s\.]?(?:0)?\d{6,14}");
2626
}
2727

2828
}

0 commit comments

Comments
 (0)