Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ng2 validations angular using reactiveforms

<form [formGroup]="form">
  <input type="password" formControlName="password"/>
  <p *ngIf="form.controls.password.errors?.required">required error</p>
  <input type="password" formControlName="certainPassword"/>
  <p *ngIf="form.controls.certainPassword.errors?.equalTo">equalTo error</p>
</form>
Source by github.com #
 
PREVIOUS NEXT
Tagged: #validations #angular #reactiveforms
ADD COMMENT
Topic
Name
9+7 =