diff --git a/FrontEnd/src/components/SignUp/components/signup/signup-form/SignUpFormContent.js b/FrontEnd/src/components/SignUp/components/signup/signup-form/SignUpFormContent.js index 35353b6d1..14bf120ff 100644 --- a/FrontEnd/src/components/SignUp/components/signup/signup-form/SignUpFormContent.js +++ b/FrontEnd/src/components/SignUp/components/signup/signup-form/SignUpFormContent.js @@ -225,7 +225,7 @@ export function SignUpFormContentComponent(props) {
@@ -264,7 +264,7 @@ export function SignUpFormContentComponent(props) { Повторіть пароль diff --git a/FrontEnd/src/constants/constants.js b/FrontEnd/src/constants/constants.js index 06257b9c5..681e1bc90 100644 --- a/FrontEnd/src/constants/constants.js +++ b/FrontEnd/src/constants/constants.js @@ -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}$/; diff --git a/validation/validate_password.py b/validation/validate_password.py index e670ecbec..f6c1283ce 100644 --- a/validation/validate_password.py +++ b/validation/validate_password.py @@ -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):