Browse Source

removed attribute validators

pull/14022/head
Maksym Tsymbarov 1 year ago
parent
commit
2435244389
  1. 2
      ui-ngx/src/app/modules/home/pages/profile/profile.component.html
  2. 2
      ui-ngx/src/app/modules/home/pages/security/authentication-dialog/email-auth-dialog.component.html
  3. 2
      ui-ngx/src/app/modules/home/pages/user/user.component.html
  4. 2
      ui-ngx/src/app/modules/home/pages/user/user.component.ts
  5. 2
      ui-ngx/src/app/modules/login/pages/login/login.component.html
  6. 2
      ui-ngx/src/app/modules/login/pages/login/reset-password-request.component.html

2
ui-ngx/src/app/modules/home/pages/profile/profile.component.html

@ -37,7 +37,7 @@
<fieldset [disabled]="isLoading$ | async">
<mat-form-field class="mat-block">
<mat-label translate>user.email</mat-label>
<input matInput type="email" formControlName="email" required/>
<input matInput type="email" formControlName="email"/>
<mat-error *ngIf="profile.get('email').hasError('required')">
{{ 'user.email-required' | translate }}
</mat-error>

2
ui-ngx/src/app/modules/home/pages/security/authentication-dialog/email-auth-dialog.component.html

@ -39,7 +39,7 @@
<div class="flex flex-row items-center justify-between gap-2">
<mat-form-field class="mat-block input-container flex-1">
<input matInput formControlName="email"
type="email" required
type="email"
placeholder="{{ 'security.2fa.dialog.email-step-label' | translate }}" />
<mat-error *ngIf="emailConfigForm.get('email').hasError('required')">
{{ 'user.email-required' | translate }}

2
ui-ngx/src/app/modules/home/pages/user/user.component.html

@ -76,7 +76,7 @@
<fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block">
<mat-label translate>user.email</mat-label>
<input matInput type="email" formControlName="email" required>
<input matInput type="email" formControlName="email">
<mat-error *ngIf="entityForm.get('email').hasError('email')">
{{ 'user.invalid-email-format' | translate }}
</mat-error>

2
ui-ngx/src/app/modules/home/pages/user/user.component.ts

@ -70,7 +70,7 @@ export class UserComponent extends EntityComponent<User>{
buildForm(entity: User): UntypedFormGroup {
return this.fb.group(
{
email: [entity ? entity.email : '', [Validators.required,validateEmail]],
email: [entity ? entity.email : '', [Validators.required, validateEmail]],
firstName: [entity ? entity.firstName : ''],
lastName: [entity ? entity.lastName : ''],
phone: [entity ? entity.phone : ''],

2
ui-ngx/src/app/modules/login/pages/login/login.component.html

@ -43,7 +43,7 @@
</div>
<mat-form-field class="tb-appearance-transparent">
<mat-label translate>login.username</mat-label>
<input id="username-input" matInput type="email" autofocus formControlName="username" email required/>
<input id="username-input" matInput type="email" autofocus formControlName="username"/>
<mat-icon matPrefix>email</mat-icon>
<mat-error *ngIf="loginFormGroup.get('username').invalid">
{{ 'login.invalid-email-format' | translate }}

2
ui-ngx/src/app/modules/login/pages/login/reset-password-request.component.html

@ -33,7 +33,7 @@
<span style="height: 50px;"></span>
<mat-form-field class="mat-block tb-appearance-transparent" hideRequiredMarker>
<mat-label translate>login.email</mat-label>
<input matInput type="email" autofocus formControlName="email" email required/>
<input matInput type="email" autofocus formControlName="email"/>
<mat-icon class="material-icons" matPrefix>email</mat-icon>
<mat-error *ngIf="requestPasswordRequest.get('email').invalid">
{{ 'user.invalid-email-format' | translate }}

Loading…
Cancel
Save