Skip to content

Commit

Permalink
Capitalize placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
mraible committed Feb 17, 2023
1 parent 55cf60e commit a9b25ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ Update `src/app/edit/edit.component.html` to display an editable form. You might
</div>
<div>
<label>Name:</label>
<input [(ngModel)]="person.name" name="name" id="name" placeholder="name"/>
<input [(ngModel)]="person.name" name="name" id="name" placeholder="Name"/>
</div>
<div>
<label>Phone:</label>
Expand Down Expand Up @@ -798,7 +798,7 @@ To make name required, modify `edit.component.html` to add a `required` attribut
[source,html]
.src/app/edit/edit.component.html
----
<input [(ngModel)]="person.name" name="name" id="name" placeholder="name" required #name="ngModel"/>
<input [(ngModel)]="person.name" name="name" id="name" placeholder="Name" required #name="ngModel"/>
<div [hidden]="name.valid || name.pristine" style="color: red">
Name is required
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/edit/edit.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h3 class="mt-2">{{person.name}}</h3>
</div>
<div class="form-group">
<label for="name">Name:</label>
<input [(ngModel)]="person.name" name="name" id="name" placeholder="name" required class="form-control" #name="ngModel" [ngClass]="{'is-invalid': name.touched && name.invalid, 'is-valid': name.touched && name.valid}"/>
<input [(ngModel)]="person.name" name="name" id="name" placeholder="Name" required class="form-control" #name="ngModel" [ngClass]="{'is-invalid': name.touched && name.invalid, 'is-valid': name.touched && name.valid}"/>
<div [hidden]="name.valid || name.pristine" style="display: block" class="invalid-feedback">
Name is required
</div>
Expand Down

0 comments on commit a9b25ee

Please sign in to comment.