diff --git a/src/app/components/edit-pin-popup/edit-pin-popup.component.html b/src/app/components/edit-pin-popup/edit-pin-popup.component.html
index a04c735..9f944f7 100644
--- a/src/app/components/edit-pin-popup/edit-pin-popup.component.html
+++ b/src/app/components/edit-pin-popup/edit-pin-popup.component.html
@@ -97,6 +97,10 @@ aria-label="Edit"
placeholder="Mont Saint-Michel"
required
/>
+
+ Le titre est requis
+ Le titre doit contenir au moins 3 caractères
+
@@ -114,6 +118,9 @@ aria-label="Edit"
(focus)="onFocus()"
(blur)="onBlur()"
/>
+
+ La localisation est requise
+
diff --git a/src/app/components/edit-pin-popup/edit-pin-popup.component.ts b/src/app/components/edit-pin-popup/edit-pin-popup.component.ts
index 8a769f0..bc042ed 100644
--- a/src/app/components/edit-pin-popup/edit-pin-popup.component.ts
+++ b/src/app/components/edit-pin-popup/edit-pin-popup.component.ts
@@ -12,6 +12,7 @@ import {
FormControl,
FormGroup,
ReactiveFormsModule,
+ Validators,
} from '@angular/forms';
import { NavigationEnd, Router } from '@angular/router';
import { forkJoin, of, Subscription } from 'rxjs';
@@ -68,10 +69,10 @@ export class EditPinPopupComponent implements OnInit, OnDestroy {
) {
// Initialiser le formulaire avec des valeurs par défaut
this.form = this.fb.group({
- title: new FormControl(''),
- description: new FormControl(''),
- location: new FormControl(''),
- complete_address: new FormControl(''),
+ title: new FormControl('', [Validators.required, Validators.minLength(3)]),
+ description: new FormControl('', [Validators.required, Validators.minLength(3)]),
+ location: new FormControl('', [Validators.required]),
+ complete_address: new FormControl('', [Validators.required]),
coordinates: new FormControl([]),
files: new FormControl(null),
date: new FormControl(''),