We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6aad58 commit 37b6d9fCopy full SHA for 37b6d9f
template-driven-forms/src/app/app.component.html
@@ -15,7 +15,7 @@ <h2>Bootcamp Enrollment Form</h2>
15
16
<div class="form-group">
17
<label>Phone</label>
18
- <input type="tel" class="form-control" name="phone" [(ngModel)]="userModel.phone">
+ <input type="tel" #phone="ngModel" pattern="^\d{10}$" class="form-control" [class.is-invalid]="phone.invalid && phone.touched" name="phone" [(ngModel)]="userModel.phone">
19
</div>
20
21
0 commit comments