Warning when using capitalized letter in login

This commit is contained in:
Chocobozzz 2021-07-20 13:47:49 +02:00
parent 01af646261
commit 7f28f2ddba
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 14 additions and 2 deletions

View File

@ -28,6 +28,10 @@
<div *ngIf="formErrors.username" class="form-error">
{{ formErrors.username }}
</div>
<div *ngIf="hasUsernameUppercase()" i18n class="form-warning">
⚠️ Most email addresses do not include capital letters.
</div>
</div>
<div class="form-group">

View File

@ -141,6 +141,10 @@ The link will expire within 1 hour.`
this.accordion = instanceAboutAccordion.accordion
}
hasUsernameUppercase () {
return this.form.value['username'].match(/[A-Z]/)
}
private loadExternalAuthToken (username: string, token: string) {
this.isAuthenticatedWithExternalAuth = true

View File

@ -123,12 +123,16 @@ code {
vertical-align: middle;
}
.form-error {
.form-error,
.form-warning {
display: block;
color: $red;
margin-top: 5px;
}
.form-error {
color: $red;
}
.input-error,
my-input-toggle-hidden ::ng-deep input {
border-color: $red !important;