Click here to Skip to main content
14,423,178 members
Rate this:
Please Sign up or sign in to vote.
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

What I have tried:

<div *ngIf="error" class="alert alert-danger">{{error}}</div>  
<h2>Reset Password</h2>  
<form [formGroup]="ChangePasswordForm" (ngSubmit)="onSubmit()">  
    <label>Reset Password</label>  
    
    <div class="form-group">  
      <label >UserName</label><br>  
      <input type="text" formControlName="userName" [(ngModel)]="userservice.formData.userName" class="textboxclass"   [ngClass]="{ 'is-invalid': submitted && c.userName.errors }" />  
      <div *ngIf="submitted && c.userName.errors" class="invalid-feedback">  
          <div *ngIf="c.userName.errors.required">UserName is required</div>  
          <div *ngIf="c.userName.errors.minlength">UserName must be at least 6 characters</div>  
      </div>  
    </div>  
Posted
Comments
MadMyche 11-Jan-20 8:23am
   
Have you used your browser's debugger to look for errors?
ahmed_sa 11-Jan-20 12:59pm
   
No can you tell me how to use it to trace problem
MadMyche 11-Jan-20 22:39pm
   
Right-click on the webpage and choose "inspect element", which will split yur borwaser window. You can use the various panes in there to check for javasvcript errors or interact with the JS consoke
ahmed_sa 13-Jan-20 8:38am
   
there is no error display on inspect
ZurdoDev 13-Jan-20 8:48am
   
There is something different about your pc or the browser you are using so I don't know what you want us to do. Use the developer tools in your browser to see what might be happening.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100