Skip to content
Snippets Groups Projects
Commit 72a52220 authored by Tom Käsler's avatar Tom Käsler
Browse files

Use type 'email' on mat input

parent a44ff792
Branches input-type-email-on-forms
Tags
1 merge request!215Use type 'email' on mat input
Pipeline #27056 passed with stages
in 6 minutes and 52 seconds
<form (ngSubmit)="resetPassword(email.value)" fxLayout="column" fxLayoutAlign="space-around"
fxLayoutGap="10px">
<mat-form-field class="input-block">
<input matInput #email placeholder="{{ 'password-reset.email' | translate }}" [formControl]="usernameFormControl"
<input matInput type="email" #email placeholder="{{ 'password-reset.email' | translate }}" [formControl]="usernameFormControl"
[errorStateMatcher]="matcher" name="email"/>
<mat-error *ngIf="usernameFormControl.hasError('required')">
{{ 'password-reset.email-required' | translate }}
......
<form (ngSubmit)="register(userName.value, userPassword1.value)" fxLayout="column"
fxLayoutAlign="space-around" fxLayoutGap="10px">
<mat-form-field class="input-block">
<input matInput #userName placeholder="{{ 'register.email' | translate }}" [formControl]="usernameFormControl"
<input matInput type="email" #userName placeholder="{{ 'register.email' | translate }}" [formControl]="usernameFormControl"
[errorStateMatcher]="matcher">
<mat-error *ngIf="usernameFormControl.hasError('email') && !usernameFormControl.hasError('required')">
{{ 'register.email-invalid' | translate }}
......@@ -12,7 +12,7 @@
</mat-form-field>
<mat-form-field class="input-block">
<input matInput #userName2 placeholder="{{ 'register.email-verify' | translate }}" [formControl]="username2FormControl"
<input matInput type="email" #userName2 placeholder="{{ 'register.email-verify' | translate }}" [formControl]="username2FormControl"
[errorStateMatcher]="matcher">
<mat-error *ngIf="username2FormControl.hasError('emailIsEqual') && !username2FormControl.hasError('required')">
{{ 'register.email-unmatch' | translate }}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment