Components/create-modal: update form
This commit is contained in:
parent
4f505507be
commit
ac9d6a4566
2 changed files with 8 additions and 3 deletions
|
|
@ -9,13 +9,17 @@
|
|||
<input formControlName="title" type="text" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Year</label>
|
||||
<input formControlName="year" type="number" class="form-control"/>
|
||||
<label class="form-label">Date</label>
|
||||
<input formControlName="date" type="date" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Seasons</label>
|
||||
<input formControlName="seasons" type="number" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Episodes</label>
|
||||
<input formControlName="episodes" type="number" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Description</label>
|
||||
<input formControlName="description" type="text" class="form-control"/>
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@ export class CreateModalComponent {
|
|||
constructor() {
|
||||
this.newShowForm = new FormGroup({
|
||||
title: new FormControl("", Validators.required),
|
||||
year: new FormControl("", [Validators.required, Validators.min(1900)]),
|
||||
date: new FormControl("", Validators.required),
|
||||
seasons: new FormControl("", [Validators.required, Validators.min(1)]),
|
||||
episodes: new FormControl("", [Validators.required, Validators.min(1)]),
|
||||
description: new FormControl("", Validators.required)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue