From e18ae7f82ce028ab578630163a1d96930b90c112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=87=E6=83=B3=E6=8E=A7?= <704564722@qq.com> Date: Thu, 27 Oct 2016 17:53:43 +0800 Subject: [PATCH] Update user_add.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 禁止创建root用户 --- templates/juser/user_add.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/juser/user_add.html b/templates/juser/user_add.html index 931f8d1922e6..5c22d09aa626 100644 --- a/templates/juser/user_add.html +++ b/templates/juser/user_add.html @@ -126,6 +126,7 @@
填写基本信息
timely: 2, theme: "yellow_right_effect", rules: { + check_name: [/(?!^root$)^[\w.]{2,20}$/i, '大小写字母数字和下划线小数点,2-20位,并且非root'], check_username: [/^[\w.]{3,20}$/, '大小写字母数字和下划线小数点'], type_m: function(element){ return $("#M").is(":checked"); @@ -133,7 +134,7 @@
填写基本信息
}, fields: { "username": { - rule: "required;check_username", + rule: "required;check_username;check_name", tip: "输入用户名", ok: "", msg: {required: "必须填写!"} @@ -174,4 +175,4 @@
填写基本信息
{#})#} -{% endblock %} \ No newline at end of file +{% endblock %}