Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CFDS] shontzu/CFDS-4498/british-pound-sign-is-not-accepted-as-a-special-character #16691

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const ResetTradingPassword = ({
errors.password = getErrorMessages().password();
} else if (platform === CFD_PLATFORMS.MT5 && !validMT5Password(values.password)) {
errors.password = localize(
'Please include at least 1 special character such as ( _ @ ? ! / # ) in your password.'
'Password must have at least one of these special characters: !&‘’*-“%+.#&(),:;?=@<>\\[]^_{}|~'
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2223,17 +2223,17 @@
justify-content: center;
@include typeface(--paragraph-left-normal-black);
color: var(--text-prominent);
padding: 2.4rem;

&__container {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
width: 100%;
width: 34rem;
justify-items: center;
flex-grow: 1;
gap: 4rem;
padding: 2.4rem 0;

@include mobile-or-tablet-screen {
min-height: 24rem;
Expand All @@ -2258,7 +2258,7 @@
}
&__password-area {
@include desktop-screen {
width: calc(min(34rem, 100vw));
width: 100%;
}
@include mobile-or-tablet-screen {
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion packages/cfd/src/Containers/cfd-password-change.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const CFDPasswordChange = observer(
'new_password',
// Localize is employed to convert the customized error message since the backend error lacks clarity.
localize(
'Please include at least 1 special character such as ( _ @ ? ! / # ) in your password.'
'Password must have at least one of these special characters: !&‘’*-“%+.#&(),:;?=@<>\\[]^_{}|~'
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cfd/src/Containers/cfd-password-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ const CFDPasswordModal = observer(({ form_error, platform }: TCFDPasswordModalPr
!validMT5Password(values.password)
) {
errors.password = localize(
'Please include at least 1 special character such as ( _ @ ? ! / # ) in your password.'
'Password must have at least one of these special characters: !&‘’*-“%+.#&(),:;?=@<>\\[]^_{}|~'
);
}
if (values.password?.toLowerCase() === email.toLowerCase()) {
Expand Down
4 changes: 2 additions & 2 deletions packages/cfd/src/Containers/cfd-reset-password-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const CFDResetPasswordModal = observer(({ platform }: TCFDResetPasswordModal) =>
errors.new_password = getErrorMessages().password();
} else if (platform !== CFD_PLATFORMS.DXTRADE && !validMT5Password(values.new_password)) {
errors.new_password = localize(
'Please include at least 1 special character such as ( _ @ ? ! / # ) in your password.'
'Password must have at least one of these special characters: !&‘’*-“%+.#&(),:;?=@<>\\[]^_{}|~'
);
}
if (values.new_password.toLowerCase() === email.toLowerCase()) {
Expand Down Expand Up @@ -212,7 +212,7 @@ const CFDResetPasswordModal = observer(({ platform }: TCFDResetPasswordModal) =>
align='center'
className='cfd-reset-password__description2'
>
<Localize i18n_default_text='Your password must contain between 8-16 characters that include uppercase and lowercase letters, and at least one number and special character ( _ @ ? ! / # ).' />
<Localize i18n_default_text='Your password must contain between 8-16 characters that include uppercase and lowercase letters, and at least one number and special character such as ( _ @ ? ! / # ).' />
</Text>
</div>
)}
Expand Down
4 changes: 3 additions & 1 deletion packages/cfd/src/Helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ const validatePassword = (password: string): string | undefined => {
} else if (!validPassword(password)) {
return getErrorMessages().password();
} else if (!validMT5Password(password)) {
return localize('Please include at least 1 special character such as ( _ @ ? ! / # ) in your password.');
return localize(
'Password must have at least one of these special characters: !&‘’*-“%+.#&(),:;?=@<>\\[]^_{}|~'
);
}
};

Expand Down
6 changes: 3 additions & 3 deletions packages/cfd/src/sass/cfd.scss
Original file line number Diff line number Diff line change
Expand Up @@ -310,17 +310,17 @@
justify-content: center;
@include typeface(--paragraph-left-normal-black);
color: var(--text-prominent);
padding: 2.4rem;

&__container {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
width: 100%;
width: 34rem;
justify-items: center;
flex-grow: 1;
gap: 4rem;
padding: 2.4rem 0;

@include mobile-or-tablet-screen {
min-height: 24rem;
Expand All @@ -345,7 +345,7 @@
}
&__password-area {
@include desktop-screen {
width: calc(min(34rem, 100vw));
width: 100%;
}
@include mobile-or-tablet-screen {
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion packages/wallets/src/constants/password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const getPasswordErrorMessage = () => ({
}),
missingCharacter: localize('Password should have lower and uppercase English letters with numbers.'),
missingCharacterMT5: localize(
'Please include at least 1 special character such as ( _ @ ? ! / # ) in your password.'
'Password must have at least one of these special characters: !&‘’*-“%+.#&(),:;?=@<>\\[]^_{}|~'
),
PasswordError: localize('That password is incorrect. Please try again.'),
});
Expand Down
Loading