feat: add selectable country for custom destinations

This commit is contained in:
Björn Fromme
2025-06-12 17:13:44 +02:00
parent 6f42ef9f7d
commit e51d92117a
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -46,6 +46,7 @@ class DestinationType extends AbstractType
'Frankreich' => 'f',
'Italien' => 'i',
'Deutschland' => 'd',
'Niederlande' => 'nl',
],
])
->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
@@ -88,4 +89,4 @@ class DestinationType extends AbstractType
'data_class' => DestinationDto::class,
]);
}
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ class DestinationDto
#[Assert\NotBlank(message: 'Bitte angeben')]
private ?string $product = null;
#[Assert\Choice(choices: ['a', 'ch', 'd', 'f', 'i'], message: 'Ungültige Auswahl')]
#[Assert\Choice(choices: ['a', 'ch', 'd', 'f', 'i', 'nl'], message: 'Ungültige Auswahl')]
private ?string $country = null;
#[Assert\NotNull(message: 'Bitte das Beginndatum angeben')]