mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
368 B
10 lines
368 B
3 years ago
|
from django.utils.translation import ugettext_lazy as _
|
||
|
from rest_framework import serializers
|
||
|
|
||
|
|
||
|
def validate_password_contains_left_double_curly_bracket(password):
|
||
|
# validate password contains left double curly bracket
|
||
|
# check password not contains `{{`
|
||
|
if '{{' in password:
|
||
|
raise serializers.ValidationError(_('Password can not contains `{{` '))
|