Skip to content

Commit

Permalink
Add max length indicator to bio
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreb committed Jul 6, 2024
1 parent 2061001 commit d38a529
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/src/app/profile/edit/edit.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ <h1>Edit your profile</h1>
<div class="col">
<mat-form-field class="full-width">
<mat-label>Name</mat-label>
<input matInput placeholder="Name" formControlName="name">
<input matInput #name placeholder="Name" maxlength="200" formControlName="name">
</mat-form-field>
</div>
</div>
<div class="row">
<div class="col">
<mat-form-field class="full-width">
<mat-label>Title</mat-label>
<input matInput placeholder="Title" formControlName="title">
<input matInput #title placeholder="Title" formControlName="title">
@if (addressForm.controls['title'].hasError('required')) {
<mat-error>Title is <strong>required</strong></mat-error>
}
Expand All @@ -36,10 +36,11 @@ <h1>Edit your profile</h1>
<div class="col">
<mat-form-field class="full-width">
<mat-label>Bio</mat-label>
<textarea matInput placeholder="Bio" formControlName="bio"></textarea>
<textarea maxlength="300" matInput #bio placeholder="Bio" formControlName="bio"></textarea>
@if (addressForm.controls['bio'].hasError('required')) {
<mat-error>Bio is <strong>required</strong></mat-error>
}
<mat-hint align="end">{{bio.value.length}} / 300</mat-hint>
</mat-form-field>
</div>
</div>
Expand Down

0 comments on commit d38a529

Please sign in to comment.