|
|
|
@ -280,6 +280,14 @@ class VariableUrUserNewPw(Variable):
|
|
|
|
|
def check(self, value):
|
|
|
|
|
if not value:
|
|
|
|
|
raise VariableError(_("Empty password"))
|
|
|
|
|
if len(value) < 8:
|
|
|
|
|
raise VariableError(_("Password should contain at least 8 symbols"))
|
|
|
|
|
elif not any([x.isupper() for x in value]):
|
|
|
|
|
raise VariableError(_("Password should contain at least 1 uppercase letter"))
|
|
|
|
|
elif not any([x.islower() for x in value]):
|
|
|
|
|
raise VariableError(_("Password should contain at least 1 lowercase letter"))
|
|
|
|
|
elif not any([x.isdigit() for x in value]):
|
|
|
|
|
raise VariableError(_("Password should contain at least 1 digit"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClClientLogin(user.VariableUrLogin):
|
|
|
|
|