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

[FEATURE] Afficher le message d'erreur "adresse email invalide ou déjà utilisée" (pix-14689) #10546

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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 @@ -2,6 +2,7 @@ import lodash from 'lodash';
const { isNil } = lodash;

import { createAccountCreationEmail } from '../../../src/identity-access-management/domain/emails/create-account-creation.email.js';
import { InvalidOrAlreadyUsedEmailError } from '../../../src/identity-access-management/domain/errors.js';
import { User } from '../../../src/identity-access-management/domain/models/User.js';
import { STUDENT_RECONCILIATION_ERRORS } from '../../../src/shared/domain/constants.js';
import { EntityValidationError } from '../../../src/shared/domain/errors.js';
Expand Down Expand Up @@ -119,6 +120,9 @@ function _createDomainUser(userAttributes) {
}

function _manageEmailAvailabilityError(error) {
if (error instanceof InvalidOrAlreadyUsedEmailError) {
error = new AlreadyRegisteredEmailError();
}
Comment on lines +123 to +125
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remarque: J'ai l'impression qu'on peut enlever le if nn ?
Dans tous les cas, on veut que error soit du type AlreadyRegisteredEmailError;

Suggested change
if (error instanceof InvalidOrAlreadyUsedEmailError) {
error = new AlreadyRegisteredEmailError();
}
error = new AlreadyRegisteredEmailError();

return _manageError(
error,
AlreadyRegisteredEmailError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { DomainErrorMappingConfiguration } from '../../shared/application/models
import {
AuthenticationKeyExpired,
DifferentExternalIdentifierError,
InvalidOrAlreadyUsedEmailError,
MissingOrInvalidCredentialsError,
MissingUserAccountError,
PasswordNotMatching,
Expand All @@ -20,6 +21,10 @@ const authenticationDomainErrorMappingConfiguration = [
name: DifferentExternalIdentifierError.name,
httpErrorFn: (error) => new HttpErrors.ConflictError(error.message),
},
{
name: InvalidOrAlreadyUsedEmailError.name,
httpErrorFn: (error) => new HttpErrors.BadRequestError(error.message, error.code),
},
{
name: MissingOrInvalidCredentialsError.name,
httpErrorFn: () =>
Expand Down
7 changes: 7 additions & 0 deletions api/src/identity-access-management/domain/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ class DifferentExternalIdentifierError extends DomainError {
}
}

class InvalidOrAlreadyUsedEmailError extends DomainError {
constructor(message = 'Adresse e-mail invalide ou déjà utilisée', code = 'INVALID_OR_ALREADY_USED_EMAIL') {
super(message, code);
}
}

class OrganizationLearnerNotBelongToOrganizationIdentityError extends DomainError {
constructor(message = 'Organization Learner identity does not belong to Organization Identity') {
super(message);
Expand Down Expand Up @@ -74,6 +80,7 @@ class UserShouldChangePasswordError extends DomainError {
export {
AuthenticationKeyExpired,
DifferentExternalIdentifierError,
InvalidOrAlreadyUsedEmailError,
MissingOrInvalidCredentialsError,
MissingUserAccountError,
OrganizationLearnerIdentityNotFoundError,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InvalidOrAlreadyUsedEmailError } from '../../../identity-access-management/domain/errors.js';
import { withTransaction } from '../../../shared/domain/DomainTransaction.js';
import { AlreadyRegisteredEmailError } from '../../../shared/domain/errors.js';
import { EntityValidationError } from '../../../shared/domain/errors.js';
import { urlBuilder } from '../../../shared/infrastructure/utils/url-builder.js';
import { createAccountCreationEmail } from '../emails/create-account-creation.email.js';
Expand Down Expand Up @@ -90,7 +90,7 @@ export { createUser };
* @private
*/
function _manageEmailAvailabilityError(error) {
return _manageError(error, AlreadyRegisteredEmailError, 'email', 'ALREADY_REGISTERED_EMAIL');
return _manageError(error, InvalidOrAlreadyUsedEmailError, 'email', 'INVALID_OR_ALREADY_USED_EMAIL');
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { knex } from '../../../../db/knex-database-connection.js';
import { InvalidOrAlreadyUsedEmailError } from '../../../identity-access-management/domain/errors.js';
import * as organizationFeaturesApi from '../../../organizational-entities/application/api/organization-features-api.js';
import { Organization } from '../../../organizational-entities/domain/models/Organization.js';
import { OrganizationLearnerForAdmin } from '../../../prescription/learner-management/domain/read-models/OrganizationLearnerForAdmin.js';
import * as organizationLearnerImportFormatRepository from '../../../prescription/learner-management/infrastructure/repositories/organization-learner-import-format-repository.js';
import { DomainTransaction } from '../../../shared/domain/DomainTransaction.js';
import {
AlreadyExistingEntityError,
AlreadyRegisteredEmailError,
AlreadyRegisteredUsernameError,
UserNotFoundError,
} from '../../../shared/domain/errors.js';
Expand Down Expand Up @@ -249,7 +249,7 @@ const updateWithEmailConfirmed = function ({ id, userAttributes }) {
const checkIfEmailIsAvailable = async function (email) {
const existingUserEmail = await knex('users').whereRaw('LOWER("email") = ?', email.toLowerCase()).first();

if (existingUserEmail) throw new AlreadyRegisteredEmailError();
if (existingUserEmail) throw new InvalidOrAlreadyUsedEmailError();

return email;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ describe('Acceptance | Identity Access Management | Application | Route | accoun

// then
expect(response.statusCode).to.equal(400);
expect(response.result.errors[0].detail).to.equal('Cette adresse e-mail est déjà utilisée.');
expect(response.result.errors[0].detail).to.equal('Adresse e-mail invalide ou déjà utilisée');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ describe('Acceptance | Identity Access Management | Application | Route | User',

// then
expect(response.statusCode).to.equal(400);
expect(response.result.errors[0].detail).to.equal('Cette adresse e-mail est déjà utilisée.');
expect(response.result.errors[0].detail).to.equal('Adresse e-mail invalide ou déjà utilisée');
});

it('should return 403 if requested user is not the same as authenticated user', async function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { expect } from 'chai';

import { InvalidOrAlreadyUsedEmailError } from '../../../../../src/identity-access-management/domain/errors.js';
import { EventLoggingJob } from '../../../../../src/identity-access-management/domain/models/jobs/EventLoggingJob.js';
import { usecases } from '../../../../../src/identity-access-management/domain/usecases/index.js';
import { userEmailRepository } from '../../../../../src/identity-access-management/infrastructure/repositories/user-email.repository.js';
import {
AlreadyRegisteredEmailError,
EmailModificationDemandNotFoundOrExpiredError,
InvalidVerificationCodeError,
UserNotAuthorizedToUpdateEmailError,
Expand Down Expand Up @@ -137,7 +137,7 @@ describe('Integration | Identity Access Management | Domain | UseCase | updateUs
});

// then
expect(error).to.be.instanceOf(AlreadyRegisteredEmailError);
expect(error).to.be.instanceOf(InvalidOrAlreadyUsedEmailError);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { each, map, times, pick } = lodash;
import { DomainTransaction } from '../../../../../lib/infrastructure/DomainTransaction.js';
import { NON_OIDC_IDENTITY_PROVIDERS } from '../../../../../src/identity-access-management/domain/constants/identity-providers.js';
import * as OidcIdentityProviders from '../../../../../src/identity-access-management/domain/constants/oidc-identity-providers.js';
import { InvalidOrAlreadyUsedEmailError } from '../../../../../src/identity-access-management/domain/errors.js';
import { User } from '../../../../../src/identity-access-management/domain/models/User.js';
import { UserDetailsForAdmin } from '../../../../../src/identity-access-management/domain/models/UserDetailsForAdmin.js';
import * as userRepository from '../../../../../src/identity-access-management/infrastructure/repositories/user.repository.js';
Expand All @@ -12,7 +13,6 @@ import { OrganizationLearnerForAdmin } from '../../../../../src/prescription/lea
import { ORGANIZATION_FEATURE } from '../../../../../src/shared/domain/constants.js';
import {
AlreadyExistingEntityError,
AlreadyRegisteredEmailError,
AlreadyRegisteredUsernameError,
UserNotFoundError,
} from '../../../../../src/shared/domain/errors.js';
Expand Down Expand Up @@ -1804,7 +1804,7 @@ describe('Integration | Identity Access Management | Infrastructure | Repository
const result = await catchErr(userRepository.checkIfEmailIsAvailable)(userInDb.email);

// then
expect(result).to.be.instanceOf(AlreadyRegisteredEmailError);
expect(result).to.be.instanceOf(InvalidOrAlreadyUsedEmailError);
});

it('should reject an AlreadyRegisteredEmailError when email case insensitive already exists', async function () {
Expand All @@ -1818,7 +1818,7 @@ describe('Integration | Identity Access Management | Infrastructure | Repository
const result = await catchErr(userRepository.checkIfEmailIsAvailable)(lowerCaseEmail);

// then
expect(result).to.be.instanceOf(AlreadyRegisteredEmailError);
expect(result).to.be.instanceOf(InvalidOrAlreadyUsedEmailError);
});
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createAccountCreationEmail } from '../../../../../src/identity-access-management/domain/emails/create-account-creation.email.js';
import { InvalidOrAlreadyUsedEmailError } from '../../../../../src/identity-access-management/domain/errors.js';
import { User } from '../../../../../src/identity-access-management/domain/models/User.js';
import { createUser } from '../../../../../src/identity-access-management/domain/usecases/create-user.usecase.js';
import { DomainTransaction } from '../../../../../src/shared/domain/DomainTransaction.js';
import { AlreadyRegisteredEmailError } from '../../../../../src/shared/domain/errors.js';
import { EntityValidationError } from '../../../../../src/shared/domain/errors.js';
import { urlBuilder } from '../../../../../src/shared/infrastructure/utils/url-builder.js';
import { catchErr, expect, sinon } from '../../../../test-helper.js';
Expand Down Expand Up @@ -140,12 +140,12 @@ describe('Unit | Identity Access Management | Domain | UseCase | create-user', f
context('when user email is already used', function () {
it('should reject with an error EntityValidationError on email already registered', async function () {
// given
const emailExistError = new AlreadyRegisteredEmailError('email already exists');
const emailExistError = new InvalidOrAlreadyUsedEmailError('email already exists');
const expectedValidationError = new EntityValidationError({
invalidAttributes: [
{
attribute: 'email',
message: 'ALREADY_REGISTERED_EMAIL',
message: 'INVALID_OR_ALREADY_USED_EMAIL',
},
],
});
Expand Down Expand Up @@ -231,9 +231,9 @@ describe('Unit | Identity Access Management | Domain | UseCase | create-user', f
},
],
});
const emailExistError = new AlreadyRegisteredEmailError('email already exists');
const emailExistError = new InvalidOrAlreadyUsedEmailError('email already exists');

it('should reject with an error EntityValidationError containing the entityValidationError and the AlreadyRegisteredEmailError', async function () {
it('should reject with an error EntityValidationError containing the entityValidationError and the InvalidOrAlreadyUsedEmailError', async function () {
// given
userRepository.checkIfEmailIsAvailable.rejects(emailExistError);
userValidator.validate.throws(entityValidationError);
Expand Down
1 change: 1 addition & 0 deletions api/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
"EMPTY_LAST_NAME": "Please enter a last name.",
"EMPTY_USERNAME": "Please enter a username.",
"FILL_USERNAME_OR_EMAIL": "Please enter an email address and/or a username.",
"INVALID_OR_ALREADY_USED_EMAIL" : "Invalid or already used e-mail address",
Copy link
Contributor

@lego-technix lego-technix Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faut saisir l'occasion de cette PR pour effectuer les modifications nécessaires pour supprimer l'utilisation de cette clé de traduction dans l'API. En effet les traductions doivent être gérées dans les apps Front, conformément à https://github.com/1024pix/pix/blob/dev/docs/adr/0044-gestion-erreurs-i18n-reference.md

"MAX_SIZE_EMAIL": "Your email address must not exceed 255 characters.",
"MAX_SIZE_FIRST_NAME": "Your first name must not exceed 255 characters.",
"MAX_SIZE_LAST_NAME": "Your last name must not exceed 255 characters.",
Expand Down
1 change: 1 addition & 0 deletions api/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"EMPTY_LAST_NAME": "No se ha introducido su nombre.",
"EMPTY_USERNAME": "Su nombre de usuario no se ha rellenado.",
"FILL_USERNAME_OR_EMAIL": "Debe introducir una dirección de correo electrónico y/o un nombre de usuario.",
"INVALID_OR_ALREADY_USED_EMAIL" : "Invalid or already used e-mail address",
Copy link
Contributor

@lego-technix lego-technix Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faut saisir l'occasion de cette PR pour effectuer les modifications nécessaires pour supprimer l'utilisation de cette clé de traduction dans l'API. En effet les traductions doivent être gérées dans les apps Front, conformément à https://github.com/1024pix/pix/blob/dev/docs/adr/0044-gestion-erreurs-i18n-reference.md

"MAX_SIZE_EMAIL": "Su dirección de correo electrónico no debe superar los 255 caracteres.",
"MAX_SIZE_FIRST_NAME": "Su nombre no debe superar los 255 caracteres.",
"MAX_SIZE_LAST_NAME": "Su nombre no debe superar los 255 caracteres.",
Expand Down
1 change: 1 addition & 0 deletions api/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@
"EMPTY_LAST_NAME": "Votre nom n’est pas renseignée.",
"EMPTY_USERNAME": "Votre identifiant n’est pas renseigné.",
"FILL_USERNAME_OR_EMAIL": "Vous devez renseigner une adresse e-mail et/ou un identifiant.",
"INVALID_OR_ALREADY_USED_EMAIL" : "Adresse e-mail invalide ou déjà utilisée",
Copy link
Contributor

@lego-technix lego-technix Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faut saisir l'occasion de cette PR pour effectuer les modifications nécessaires pour supprimer l'utilisation de cette clé de traduction dans l'API. En effet les traductions doivent être gérées dans les apps Front, conformément à https://github.com/1024pix/pix/blob/dev/docs/adr/0044-gestion-erreurs-i18n-reference.md

"MAX_SIZE_EMAIL": "Votre adresse e-mail ne doit pas dépasser les 255 caractères.",
"MAX_SIZE_FIRST_NAME": "Votre prénom ne doit pas dépasser les 255 caractères.",
"MAX_SIZE_LAST_NAME": "Votre nom ne doit pas dépasser les 255 caractères.",
Expand Down
1 change: 1 addition & 0 deletions api/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"EMPTY_LAST_NAME": "Je naam is niet ingevuld.",
"EMPTY_USERNAME": "Uw login is niet ingevuld.",
"FILL_USERNAME_OR_EMAIL": "Je moet een e-mailadres en/of een gebruikersnaam invoeren.",
"INVALID_OR_ALREADY_USED_EMAIL" : "Invalid or already used e-mail address",
Copy link
Contributor

@lego-technix lego-technix Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faut saisir l'occasion de cette PR pour effectuer les modifications nécessaires pour supprimer l'utilisation de cette clé de traduction dans l'API. En effet les traductions doivent être gérées dans les apps Front, conformément à https://github.com/1024pix/pix/blob/dev/docs/adr/0044-gestion-erreurs-i18n-reference.md

"MAX_SIZE_EMAIL": "Je e-mailadres mag niet langer zijn dan 255 tekens.",
"MAX_SIZE_FIRST_NAME": "Je voornaam mag niet langer zijn dan 255 tekens.",
"MAX_SIZE_LAST_NAME": "Je naam mag niet langer zijn dan 255 tekens.",
Expand Down
2 changes: 1 addition & 1 deletion certif/app/components/auth/register-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default class RegisterForm extends Component {
const status = get(response, 'errors[0].status');

if (status === '422') {
this.errorMessage = this.intl.t('common.form-errors.email.already-exists');
this.errorMessage = this.intl.t('common.form-errors.email.invalid-or-already-used-email');
} else {
this.errorMessage = this.intl.t('common.form-errors.default');
}
Expand Down
2 changes: 1 addition & 1 deletion certif/tests/unit/components/auth/register-form-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ module('Unit | Component | register-form', (hooks) => {
await component.register(eventStub);

// then
assert.strictEqual(component.errorMessage, t('common.form-errors.email.already-exists'));
assert.strictEqual(component.errorMessage, t('common.form-errors.email.invalid-or-already-used-email'));
sinon.assert.calledOnce(deleteRecord);
});
});
Expand Down
4 changes: 2 additions & 2 deletions certif/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"form-errors": {
"default": "The service is temporarily unavailable. Please try again later.",
"email": {
"already-exists": "This email address is already registered, please login.",
"format": "Your email address is invalid."
"format": "Your email address is invalid.",
"invalid-or-already-used-email": "Invalid or already used e-mail address"
},
"fill-mandatory-fields": "Please fill in all the required fields before confirming.",
"firstname": {
Expand Down
4 changes: 2 additions & 2 deletions certif/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"form-errors": {
"default": "Le service est momentanément indisponible. Veuillez réessayer ultérieurement.",
"email": {
"already-exists": "Cette adresse e-mail est déjà enregistrée, connectez-vous.",
"format": "Le champ adresse e-mail n’est pas valide."
"format": "Le champ adresse e-mail n’est pas valide.",
"invalid-or-already-used-email": "Adresse e-mail invalide ou déjà utilisée"
},
"fill-mandatory-fields": "Veuillez remplir tous les champs obligatoires avant de valider.",
"firstname": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
class="account-recovery__content--not-found-error"
id="backup-email-confirmation-already-use-error-message"
>
{{t "pages.account-recovery.find-sco-record.backup-email-confirmation.form.error.new-email-already-exist"}}
{{t
"pages.account-recovery.find-sco-record.backup-email-confirmation.form.error.invalid-or-already-used-email"
}}
</PixMessage>
{{/if}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const ERROR_INPUT_MESSAGE_MAP = {
invalidEmail: 'pages.user-account.account-update-email-with-validation.fields.errors.invalid-email',
emptyPassword: 'pages.user-account.account-update-email-with-validation.fields.errors.empty-password',
emailAlreadyExist: 'pages.user-account.account-update-email-with-validation.fields.errors.new-email-already-exist',
invalidOrAlreadyUsedEmail:
'pages.user-account.account-update-email-with-validation.fields.errors.invalid-or-already-used-email',
invalidPassword: 'pages.user-account.account-update-email-with-validation.fields.errors.invalid-password',
unknownError: 'pages.user-account.account-update-email.fields.errors.unknown-error',
};
Expand Down Expand Up @@ -89,8 +91,8 @@ export default class EmailWithValidationForm extends Component {
} else if (status === '400') {
const code = get(response, 'errors[0].code');
this.errorMessage = this.intl.t(ERROR_INPUT_MESSAGE_MAP['invalidPassword']);
if (code === 'ACCOUNT_WITH_EMAIL_ALREADY_EXISTS') {
this.errorMessage = this.intl.t(ERROR_INPUT_MESSAGE_MAP['emailAlreadyExist']);
if (code === 'INVALID_OR_ALREADY_USED_EMAIL') {
this.errorMessage = this.intl.t(ERROR_INPUT_MESSAGE_MAP['invalidOrAlreadyUsedEmail']);
}
} else {
this.errorMessage = this.intl.t(ERROR_INPUT_MESSAGE_MAP['unknownError']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default class FindScoRecordController extends Controller {
const hasInternalErrorOrConflictOrAlreadyLeftSco =
status === 403 || status === 409 || status >= 500 || isApiUnreachable;
const isEmailAlreadyRegistered =
this.showBackupEmailConfirmationForm && status === 400 && code === 'ACCOUNT_WITH_EMAIL_ALREADY_EXISTS';
this.showBackupEmailConfirmationForm && status === 400 && code === 'INVALID_OR_ALREADY_USED_EMAIL';

if (!hasInternalErrorOrConflictOrAlreadyLeftSco || isEmailAlreadyRegistered) {
this._showErrorOnComponent(isEmailAlreadyRegistered);
Expand Down
2 changes: 1 addition & 1 deletion mon-pix/mirage/routes/account-recovery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function index(config) {
400,
{},
{
errors: [{ status: '400', code: 'ACCOUNT_WITH_EMAIL_ALREADY_EXISTS' }],
errors: [{ status: '400', code: 'INVALID_OR_ALREADY_USED_EMAIL' }],
},
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ module('Acceptance | account-recovery | FindScoRecordRoute', function (hooks) {
// then
assert.ok(
screen.getByText(
t('pages.account-recovery.find-sco-record.backup-email-confirmation.form.error.new-email-already-exist'),
t(
'pages.account-recovery.find-sco-record.backup-email-confirmation.form.error.invalid-or-already-used-email',
),
),
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module('Integration | Component | user-account | email-with-validation-form', fu
const emailAlreadyExist = '[email protected]';
const password = 'password';
store.createRecord = () => ({
sendNewEmail: sinon.stub().throws({ errors: [{ status: '400', code: 'ACCOUNT_WITH_EMAIL_ALREADY_EXISTS' }] }),
sendNewEmail: sinon.stub().throws({ errors: [{ status: '400', code: 'INVALID_OR_ALREADY_USED_EMAIL' }] }),
});

const screen = await render(
Expand All @@ -108,7 +108,7 @@ module('Integration | Component | user-account | email-with-validation-form', fu
// then
assert.ok(
screen.getByText(
t('pages.user-account.account-update-email-with-validation.fields.errors.new-email-already-exist'),
t('pages.user-account.account-update-email-with-validation.fields.errors.invalid-or-already-used-email'),
),
);
});
Expand Down
2 changes: 2 additions & 0 deletions mon-pix/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@
"new-email": ",if not, enter a new one."
},
"empty-email": "The e-mail address field is mandatory.",
"invalid-or-already-used-email" : "Invalid or already used e-mail address",
"new-backup-email": "Please enter a valid e-mail address to recover your account",
"new-email-already-exist": "This e-mail address is already in use",
"wrong-email-format": "Your e-mail address is invalid."
Expand Down Expand Up @@ -2074,6 +2075,7 @@
"errors": {
"empty-password": "Your password can't be empty.",
"invalid-email": "Your email address is invalid.",
"invalid-or-already-used-email" : "Invalid or already used e-mail address",
"invalid-password": "There was an error in the password entered.",
"new-email-already-exist": "This email address is already in use."
},
Expand Down
Loading