We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5442dc1 commit bf13a65Copy full SHA for bf13a65
src/KSFramework/Utilities/ValidationExtensions.cs
@@ -10,7 +10,7 @@ public static bool IsValidEmail(this string email)
10
return false;
11
try
12
{
13
- MailAddress m = new MailAddress(email);
+ _ = new MailAddress(email);
14
15
return true;
16
}
@@ -22,7 +22,7 @@ public static bool IsValidEmail(this string email)
22
23
public static bool IsValidMobile(this string phone)
24
25
- return Regex.Match(phone, @"(\+98|0)?9\d{9}").Success;
+ return Regex.IsMatch(phone, @"((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}");
26
27
28
0 commit comments