diff --git a/client/src/app/+login/login.component.html b/client/src/app/+login/login.component.html index 57d79b369..84d4a1d8a 100644 --- a/client/src/app/+login/login.component.html +++ b/client/src/app/+login/login.component.html @@ -1,3 +1,9 @@ + +
+ ⚠️ Most email addresses do not include capital letters. +
+
+

{{ instanceName }} @@ -54,16 +60,14 @@ -
- ⚠️ Most email addresses do not include capital letters. -
+
@@ -145,6 +149,8 @@ type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required [(ngModel)]="forgotPasswordEmail" #forgotPasswordEmailInput > + + diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts index a8fec9641..73991ddd0 100644 --- a/client/src/app/+login/login.component.ts +++ b/client/src/app/+login/login.component.ts @@ -178,7 +178,16 @@ The link will expire within 1 hour.` } hasUsernameUppercase () { - return this.form.value['username'].match(/[A-Z]/) + const username = this.form.value['username'] + if (!username) return false + + return username.match(/[A-Z]/) + } + + hasForgotPasswordEmailUppercase () { + if (!this.forgotPasswordEmail) return false + + return this.forgotPasswordEmail.match(/[A-Z]/) } private loadExternalAuthToken (username: string, token: string) {