US01, US03: Fix bug where all whitespaces were considered valid input on horse create and update
This commit is contained in:
@@ -17,12 +17,12 @@
|
||||
<form (ngSubmit)="addHorse()" #horseForm="ngForm">
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<input type="text" class="form-control" name="name" [(ngModel)]="horse.name" required>
|
||||
<input type="text" class="form-control" name="name" pattern="\S+.*" [(ngModel)]="horse.name" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<textarea class="form-control" name="description" [(ngModel)]="horse.description" value=""></textarea>
|
||||
<textarea class="form-control" name="description" pattern="\S+.*" [(ngModel)]="horse.description" value=""></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
@@ -17,12 +17,12 @@
|
||||
<form (ngSubmit)="updateHorse()" #horseForm="ngForm">
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<input type="text" class="form-control" name="name" [(ngModel)]="horse.name" required>
|
||||
<input type="text" class="form-control" name="name" [(ngModel)]="horse.name" pattern="\S+.*" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<textarea class="form-control" name="description" [(ngModel)]="horse.description"></textarea>
|
||||
<textarea class="form-control" name="description" pattern="\S+.*" [(ngModel)]="horse.description"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
Reference in New Issue
Block a user