美文网首页
正则验证

正则验证

作者: BigbyLong | 来源:发表于2017-09-05 17:49 被阅读10次

C#正则验证手机号:

bool isMobile = System.Text.RegularExpressions.Regex.IsMatch(model.ProLinkPhone, @"^(\((\+)?86\)|((\+)?86)?)0?1[3458]\d{9}$");

手机号

JS验证手机号:

!/^(\((\+)?86\)|((\+)?86)?)0?1[3458]\d{9}$/.test(inMobile)

手机号

相关文章

网友评论

      本文标题:正则验证

      本文链接:https://www.haomeiwen.com/subject/uicpjxtx.html