|
|
@ -2,10 +2,19 @@
|
|
|
|
<mat-form-field>
|
|
|
|
<mat-form-field>
|
|
|
|
<label for="name">Nom</label>
|
|
|
|
<label for="name">Nom</label>
|
|
|
|
<input matInput id="name" type="text" formControlName="name" required>
|
|
|
|
<input matInput id="name" type="text" formControlName="name" required>
|
|
|
|
|
|
|
|
@if (createForm.controls.name.errors?.['minlength']) {
|
|
|
|
|
|
|
|
<mat-error>Le nom doit contenir au moins {{ createForm.controls.name.errors!['minlength'].requiredLength }} caractères.</mat-error>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@if (createForm.controls.name.errors?.['maxlength']) {
|
|
|
|
|
|
|
|
<mat-error>Le nom ne peut dépasser {{ createForm.controls.name.errors!['maxlength'].requiredLength }} caractères.</mat-error>
|
|
|
|
|
|
|
|
}
|
|
|
|
</mat-form-field>
|
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
|
|
<mat-form-field>
|
|
|
|
<label for="description">Description</label>
|
|
|
|
<label for="description">Description</label>
|
|
|
|
<textarea matInput id="description" type="text" formControlName="description" required></textarea>
|
|
|
|
<textarea matInput id="description" type="text" formControlName="description" required></textarea>
|
|
|
|
|
|
|
|
@if (createForm.controls.description.errors?.['maxlength']) {
|
|
|
|
|
|
|
|
<mat-error>La description ne peut dépasser {{ createForm.controls.description.errors!['maxlength'].requiredLength }} caractères.</mat-error>
|
|
|
|
|
|
|
|
}
|
|
|
|
</mat-form-field>
|
|
|
|
</mat-form-field>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<label for="image">Image</label>
|
|
|
|
<label for="image">Image</label>
|
|
|
|