public static bool IsMobile(string val)
{
return Regex.IsMatch(val, @"^1[358]\d{9}$", RegexOptions.IgnoreCase);
}
public static bool IsMail(string val)
{
return Regex.IsMatch(val,@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", RegexOptions.IgnoreCase);
}
public static bool IsCD(string val)
{
return (Regex.IsMatch(val, @"^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[A-Z])$", RegexOptions.IgnoreCase) ||
Regex.IsMatch(val, @"^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$", RegexOptions.IgnoreCase));
}
{
return Regex.IsMatch(val, @"^1[358]\d{9}$", RegexOptions.IgnoreCase);
}
public static bool IsMail(string val)
{
return Regex.IsMatch(val,@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", RegexOptions.IgnoreCase);
}
public static bool IsCD(string val)
{
return (Regex.IsMatch(val, @"^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[A-Z])$", RegexOptions.IgnoreCase) ||
Regex.IsMatch(val, @"^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$", RegexOptions.IgnoreCase));
}