v.Safe = /^[\-a-zA-Z0-9\u4e00-\u9fa5]+$/;
v.Account = /^[a-z][a-z0-9]{3,15}$/;
//v.UnSafe= /[@#\$%\^\*<>'=;\(\)\-;"/\\]+/;
v.UserName = /^[A-Za-z0-9\u4e00-\u9fa5]{2,10}$/;
v.UserRealName = /^[\u4e00-\u9fa5]{1,20}$/;
v.Email = /^[A-Za-z0-9_]+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
v.Mobile = /^(13|14|15|18)\d{9}$/;
v.Phone = /^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/;
v.Msn = /^\w+@hotmail\.com$/;
v.Number = /^\d+$/;
v.Zip = /^[1-9]\d{5}$/;
v.QQ = /^[1-9]\d{4,14}$/;
v.English = /^[A-Za-z]+$/;
v.Chinese = /^[\u0391-\uFFE5]+$/;
v.Int = /^[0-9]+$/;
v.Card = /^\d{17}[\dxX]$/;
v.Float = /^[\+\-]?\d+(\.\d{2})?$/;
v.Decimal = /^[\+\-]?\d{1,18}(\.\d{2,10})?$/;
v.Double = /^[\+\-]?\d+(\.\d+)?$/;
v.Currency = /^\d+(\.\d+)?$/;
v.Favorite = /^([\-a-zA-Z0-9\u4e00-\u9fa5]+[\s]?[\-a-zA-Z0-9\u4e00-\u9fa5]*)*$/;
v.Url = /^(http|https)\:\/\/\w*(\.\w+)*(\/\w+)*(\?\w+=\w*(&\w+=\w*)*)?\/?\w*.?\w*$/g;
v.Ip = /^([0-9]{1,3}\.{1}){3}[0-9]{1,3}$/;
javascript判断输入类型
最新推荐文章于 2023-11-01 22:43:55 发布