diff --git a/src/core/components/input-errors/input-errors.ts b/src/core/components/input-errors/input-errors.ts index 570386555..b43c55cdd 100644 --- a/src/core/components/input-errors/input-errors.ts +++ b/src/core/components/input-errors/input-errors.ts @@ -64,17 +64,19 @@ export class CoreInputErrorsComponent implements OnInit, OnChanges { * Initialize some common errors if they aren't set. */ protected initErrorMessages(): void { + // Set default error messages. this.errorMessages = { - required: this.errorMessages.required || 'core.required', - email: this.errorMessages.email || 'core.login.invalidemail', - date: this.errorMessages.date || 'core.login.invaliddate', - datetime: this.errorMessages.datetime || 'core.login.invaliddate', - datetimelocal: this.errorMessages.datetimelocal || 'core.login.invaliddate', - time: this.errorMessages.time || 'core.login.invalidtime', - url: this.errorMessages.url || 'core.login.invalidurl', + required: 'core.required', + email: 'core.login.invalidemail', + date: 'core.login.invaliddate', + datetime: 'core.login.invaliddate', + datetimelocal: 'core.login.invaliddate', + time: 'core.login.invalidtime', + url: 'core.login.invalidurl', // Set empty values by default, the default error messages will be built in the template when needed. - max: this.errorMessages.max || '', - min: this.errorMessages.min || '', + max: '', + min: '', + ...this.errorMessages, }; this.errorMessages.requiredTrue = this.errorMessages.required; diff --git a/src/core/features/login/tests/behat/signup.feature b/src/core/features/login/tests/behat/signup.feature index 69db46ad7..eb277a005 100755 --- a/src/core/features/login/tests/behat/signup.feature +++ b/src/core/features/login/tests/behat/signup.feature @@ -18,7 +18,6 @@ Feature: Test signup in app And I should find "These are the authentication instructions." in the app But I should not find "Create new account" in the app - @ionic7_failure Scenario: Basic signup When I launch the app