angular submit with required

Solutions on MaxInterview for angular submit with required by the best coders in the world

showing results for - "angular submit with required"
Mervin
04 Sep 2019
1<form (ngSubmit)="onSubmit()" #testForm="ngForm" ngNativeValidate>
2  <input type="text" id="test1" name="test1" [(ngModel)]="test" required>
3  <input type="text" id="test2" name="test2" [(ngModel)]="test" [required]="true">
4  <input type="text" id="test3" name="test3" [(ngModel)]="test" [attr.required]="true">
5  <button type="submit">submit</button>
6</form>
7
8
9<-- The important thing here is the "ngNativeValidate" -->