Exemplo n.º 1
0
def _check_password(password):
    if password:  # Oddly, empty password validation happens after this.
        if not password_allowed(password):
            msg = _("The password entered is known to be commonly used and " "is not allowed.")
            raise forms.ValidationError(msg)

        if not password_re.search(password):
            msg = _("At least one number and one English letter are required " "in the password.")
            raise forms.ValidationError(msg)
Exemplo n.º 2
0
def _check_password(password):
    if password:  # Oddly, empty password validation happens after this.
        if not password_allowed(password):
            msg = _('The password entered is known to be commonly used and '
                    'is not allowed.')
            raise forms.ValidationError(msg)

        if not password_re.search(password):
            msg = _('At least one number and one English letter are required '
                    'in the password.')
            raise forms.ValidationError(msg)
Exemplo n.º 3
0
def _check_password(password):
    if not password_allowed(password):
        msg = _('The password entered is known to be commonly used and '
                'is not allowed.')
        raise forms.ValidationError(msg)
Exemplo n.º 4
0
def _check_password(password):
    if not password_allowed(password):
        msg = _('The password entered is known to be commonly used and '
                'is not allowed.')
        raise forms.ValidationError(msg)