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)
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)
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)