1. 程式人生 > >正則驗證積累

正則驗證積累

海拔 etime 手機 mfile comm 時間 授權 tor 有效

"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":""}//授權狀態

正則驗證積累