Skip to content

Commit

Permalink
Merge pull request #599 from ita-social-projects/#559-NoRegisteringAP…
Browse files Browse the repository at this point in the history
…asswordLongerThan20Characters

#559 no registering a password longer than20 characters
  • Loading branch information
ohorodnykostap authored May 17, 2024
2 parents 3625dfb + f40e3a7 commit 2b78c41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function SignUpFormContentComponent(props) {
<div className={styles['signup-form__label--password']}>
<label>Пароль</label>
<label className={styles['signup-form__label--hint']}>
(Повинен містити від 8 до 50 символів, A-Z, a-z, 0-9)
(Повинен містити від 8 символів, A-Z, a-z, 0-9)
</label>
</div>
</div>
Expand Down Expand Up @@ -264,7 +264,7 @@ export function SignUpFormContentComponent(props) {
Повторіть пароль
</label>
<label className={styles['signup-form__label--hint']}>
(Повинен містити від 8 до 50 символів, A-Z, a-z, 0-9)
(Повинен містити від 8 символів, A-Z, a-z, 0-9)
</label>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion FrontEnd/src/constants/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const EMAIL_PATTERN = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i;
export const PASSWORD_PATTERN = /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{8,20}$/;
export const PASSWORD_PATTERN = /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{8,128}$/;
export const NAME_SURNAME_PATTERN = /^(?=.{2,50}$)[a-zA-Zа-щюяьА-ЩЮЯЬїЇіІєЄґҐ']+(\s[a-zA-Zа-щюяьА-ЩЮЯЬїЇіІєЄґҐ']+)*$/;
export const COMPANY_NAME_PATTERN = /^.{2,100}$/;
2 changes: 2 additions & 0 deletions validation/validate_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
def validate_password_long(password_value: str):
if len(password_value) < 8:
raise ValidationError("Password must be at least 8 characters long.")
if len(password_value) > 128:
raise ValidationError("The password must not exceed 128 characters.")


def validate_password_include_symbols(password_value: str):
Expand Down

0 comments on commit 2b78c41

Please sign in to comment.