add validation

This commit is contained in:
venbatechnologies@gmail.com 2021-11-09 19:51:23 +05:30
parent 99dc2347ac
commit f3ebdadf68

View File

@ -267,7 +267,7 @@
</mat-form-field>
<mat-form-field style="width: 20%">
<input matInput autocomplete="off" placeholder="Mobile Number" formControlName="mobile_no" type="text" ForMobileNumbers maxlength="10" minlength="10" (change)="checkExistPd($event.target.value,2)">
<input matInput autocomplete="off" placeholder="Mobile Number" formControlName="mobile_no" type="text" ForMobileNumbers maxlength="10" minlength="10" (change)="checkExistPd($event.target.value,2)" required>
<mat-error *ngIf="pdMain.mobile_no.hasError('required')">Mobile No is Required . </mat-error>
<mat-error *ngIf="pdMain.mobile_no.hasError('maxlength') || pdMain.mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field>