diff --git a/templates/jperm/perm_role_add.html b/templates/jperm/perm_role_add.html index f002b8263..d38e80ee6 100644 --- a/templates/jperm/perm_role_add.html +++ b/templates/jperm/perm_role_add.html @@ -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填写有误,请检查'], }, diff --git a/templates/jperm/perm_role_edit.html b/templates/jperm/perm_role_edit.html index 2189b6208..420eb300a 100644 --- a/templates/jperm/perm_role_edit.html +++ b/templates/jperm/perm_role_edit.html @@ -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填写有误,请检查'], },