Skip to content

Commit

Permalink
Update user_add.html
Browse files Browse the repository at this point in the history
禁止创建root用户
  • Loading branch information
jiaxiangkong authored Oct 27, 2016
1 parent e528668 commit e18ae7f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions templates/juser/user_add.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,15 @@ <h5>填写基本信息</h5>
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");
}
},
fields: {
"username": {
rule: "required;check_username",
rule: "required;check_username;check_name",
tip: "输入用户名",
ok: "",
msg: {required: "必须填写!"}
Expand Down Expand Up @@ -174,4 +175,4 @@ <h5>填写基本信息</h5>
{#})#}

</script>
{% endblock %}
{% endblock %}

0 comments on commit e18ae7f

Please sign in to comment.