ahmed elbarbary

ahmed elbarbary

  • NA
  • 1.6k
  • 275.5k

error validations reactive form not display on my PC only ?

Jan 11 2020 4:56 AM
problem
 
error validations reactive form not display on my PC only ?
 
meaning when user name is empty error not display but on another pc
 
same component work without change any thing 
 
I work on angular 7 project 
 
I work on reacive form all controls validation empty not work on my pc
 
i take ts and html component and put them in another project on nother pc 
 
it working without change any thing
 
so how to solve the problem and why this error display ?
 
my form as below 
  1. <div *ngIf="error" class="alert alert-danger">{{error}}</div>  
  2. <h2>Reset Password</h2>  
  3. <form [formGroup]="ChangePasswordForm" (ngSubmit)="onSubmit()">  
  4.     <label>Reset Password</label>  
  5.     
  6.     <div class="form-group">  
  7.       <label >UserName</label><br>  
  8.       <input type="text" formControlName="userName" [(ngModel)]="userservice.formData.userName" class="textboxclass"   [ngClass]="{ 'is-invalid': submitted && c.userName.errors }" />  
  9.       <div *ngIf="submitted && c.userName.errors" class="invalid-feedback">  
  10.           <div *ngIf="c.userName.errors.required">UserName is required</div>  
  11.           <div *ngIf="c.userName.errors.minlength">UserName must be at least 6 characters</div>  
  12.       </div>  
  13.     </div>  
 

Answers (1)