Skip to content

Commit

Permalink
Improve UX password_match_message()
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Apr 18, 2023
1 parent 5ede721 commit c85dd31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions password_security/models/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ def password_match_message(self):
company_id = self.company_id
message = []
if company_id.password_lower:
message.append('* ' + _('Lowercase letter'))
message.append('\n* ' + _('Lowercase letter'))
if company_id.password_upper:
message.append('* ' + _('Uppercase letter'))
message.append('\n* ' + _('Uppercase letter'))
if company_id.password_numeric:
message.append('* ' + _('Numeric digit'))
message.append('\n* ' + _('Numeric digit'))
if company_id.password_special:
message.append('* ' + _('Special character'))
message.append('\n* ' + _('Special character'))
if len(message):
message = [_('Must contain the following:')] + message
if company_id.password_length:
Expand Down

0 comments on commit c85dd31

Please sign in to comment.