修改前端禁止root的正则表达式,做精确匹配

pull/34/head
yumaojun 2016-01-04 13:17:58 +08:00
parent 0821e7cf41
commit ed6559bbe9
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ $('#roleForm').validator({
timely: 2,
theme: "yellow_right_effect",
rules: {
check_name: [/(?!root)^\w{2,20}$/i, '大小写字母数字和下划线,2-20位,并且非root'],
check_name: [/(?!^root$)^\w{2,20}$/i, '大小写字母数字和下划线,2-20位,并且非root'],
check_begin: [/^[\-]+BEGIN RSA PRIVATE KEY[\-]+/gm, 'RSA Key填写有误请检查'],
},

View File

@ -94,7 +94,7 @@ $('#roleForm').validator({
timely: 2,
theme: "yellow_right_effect",
rules: {
check_name: [/(?!root)^\w{2,20}$/i, '大小写字母数字和下划线,2-20位,并且非root'],
check_name: [/(?!^root$)^\w{2,20}$/i, '大小写字母数字和下划线,2-20位,并且非root'],
check_begin: [/^[\-]+BEGIN RSA PRIVATE KEY[\-]+/gm, 'RSA Key填写有误请检查'],
},