正则验证积累

Posted 浮生

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了正则验证积累相关的知识,希望对你有一定的参考价值。

"businessUnit":{"reg":‘‘,"title":""},//业主单位
"projectCode":{"reg":‘‘,"title":""},//项目编号
"projectName":{"reg":/^[a-zA-Z\u4e00-\u9fa5]{1,50}$/,"title":"请最多输入50个汉字、字母"},//项目名称
"farmId":{"reg":‘‘,"title":""},//场站编号
"farmName":{"reg":‘‘,"title":""},//场站名称
"code":{"reg":/^\w{1,20}$/,"title":"长度最多20字符","url":‘model/equipment/validByCode.action‘},//设备编号
"surveyLayers":{"reg":/^[1-9]{0,1}[0-9]{1}$/,"title":"请输入两位整数"},//监测层数
"surveyAltitude":{"reg":/^(([1-9][0-9][0-9])|([1-9][0-9])|[0-9]){1}$/,"title":"请输入三位整数"},//监测高度

"longitude":{"reg": /^([E|W])(?:(?:180(?:\.0{1,4})?)|(?:(?:(?:1[0-7]\d)|(?:[1-9]?\d))(?:\.\d{1,4})?))$/,"title":"经度例:E101.2231"},//经度
"latitude":{"reg":/^([N|S])(?:90(?:\.0{1,4})?|(?:[1-8]?\d(?:\.\d{1,4})?))$/,"title":"纬度例:N38.2313"},//纬度



"gatherUnit":{"reg":/^[^\s]{1,20}$/,"title":"可输入最多20个字母、数字、字符"},//采集设备厂家
"contactUnit":{"reg":/^[^\s]{1,20}$/,"title":"可输入最多20个字母、数字、字符"},//通讯设备厂家
//"email":{"reg":/^[a-zA-Z0-9_-][email protected][a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,"title":"多个邮箱地址用‘,‘分隔"},//邮箱地址
"email":{"reg":/^((([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6}\,))*(([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})))$/
,"title":"多个邮箱地址用‘,‘分隔"},//邮箱地址
//"email":{"reg":/^(\w)+(\.\w+)*@(\w)+((\.\w{2,3}){1,3})$/,"title":"多个邮箱地址用‘,‘分隔"},//邮箱地址
"equipmentParams":{"reg":/^\w{0,500}$/,"title":"最多输入500个字"},//设备参数
"modelCode":{"reg":"","title":""},//风机型号
"capacity":{"reg":/^[0-9]+([.]{1}[0-9]+){0,1}$/,"title":"仅能输入数字"},//单机容量
"supplier":{"reg":/^\S{0,50}$/,"title":"最多输入50个字符"},//供应商
"modleCode":{"reg":/^\S{0,20}$/,"title":"最多输入20个字符"},//设备型号
"beginDate":{"reg":"","title":""},//营运起始时间
"endDate":{"reg":"","title":""},//营运截止时间
"qcDate":{"reg":"","title":""},//质保到期日期
"altitude":{"reg":/^(([1-9]+[0-9]*.{1}[0-9]+)|([0].{1}[1-9]+[0-9]*)|([1-9][0-9]*)|([0][.][0-9]+[1-9]*))$/,"title":"请输入有效数字"},//海拔

"kname":{"reg":"","title":""},//场站名称
"farmorcordid":{"reg":"","title":""},//场站编号
"provinceName":{"reg":"","title":""},//所属区域名称
"province":{"reg":"","title":""},//所属区域
"realInstallCapacity":{"reg":/^[0-9]+([.]{1}[0-9]+){0,1}$/,"title":"仅能输入数字"},//装机容量
"fan_number":{"reg":/^[0-9]+([.]{1}[0-9]+){0,1}$/,"title":"仅能输入数字"},//风机数量
"telephone":{"reg":/^1[34578]\d{9}$/,"title":" 请输入正确的手机号"},//电话
"farmFile":{"reg":"","title":""},//场站图片
"projectFrom":{"reg":"","title":""},//项目来源
"commissioningTime":{"reg":"","title":""},//并网时间
"modeling_time":{"reg":"","title":""},//服务开始时间(启用时间)
"validdate":{"reg":"","title":""},//服务截止时间(授权截止日期)
"kstate":{"reg":"","title":""},//授权状态
"monitorstate":{"reg":"","title":""},//监控状态
"farmStatus":{"reg":"","title":""},//场站状态
"atten":{"reg":"","title":""},//联系人
"createUser":{"reg":"","title":""},//录入人
"createTime":{"reg":"","title":""},//录入时间
"kstate":{"reg":"","title":""}//授权状态

以上是关于正则验证积累的主要内容,如果未能解决你的问题,请参考以下文章

js 正则验证正整数

js如何正则验证密码

C#正则验证大全 Regex.IsMatch()正则表达式验证

C#正则验证大全 Regex.IsMatch()正则表达式验证

js 正则验证不能含有中文与特殊字符

比较常用证件正则表达式验证大全