Files
jumpserver/apps/common/validators.py
老广 e630321e55 Perms return (#1293) (#1294)
* [Update] 修改版本号

* [Update] 默认关闭定时任务

* [Update] 修改授权列表创建api,返回id

* [Update] 修改用户名校验规则
2018-05-04 15:04:39 +08:00

7 lines
219 B
Python

# -*- coding: utf-8 -*-
#
from django.core.validators import RegexValidator
from django.utils.translation import ugettext_lazy as _
alphanumeric = RegexValidator(r'^[0-9a-zA-Z_@\-\.]*$', _('Special char not allowed'))