feat: offer contact validation flow

This commit is contained in:
2026-09-16 10:40:01 +02:00
parent 5d7ffd7d58
commit 12fe4d8e15
15 changed files with 1219 additions and 554 deletions
+13 -11
View File
@@ -43,33 +43,35 @@ class AccommodationBookingDto
/** @var array<string, mixed> */
public array $priceBreakdown = [];
#[Assert\NotBlank(message: 'required', groups: ['step_3'])]
// `contact` is the subset an office-made offer is checked against before the customer
// may accept it — the same constraints the customer meets in step 3 of a self-service booking.
#[Assert\NotBlank(message: 'required', groups: ['step_3', 'contact'])]
public ?string $groupName = null;
#[Assert\NotBlank(message: 'required', groups: ['step_3'])]
#[Assert\Choice(choices: ['Herr', 'Frau', 'divers'], groups: ['step_3'])]
#[Assert\NotBlank(message: 'required', groups: ['step_3', 'contact'])]
#[Assert\Choice(choices: ['Herr', 'Frau', 'divers'], groups: ['step_3', 'contact'])]
public ?string $salutation = null;
#[Assert\NotBlank(message: 'required', groups: ['step_3'])]
#[Assert\NotBlank(message: 'required', groups: ['step_3', 'contact'])]
public ?string $firstName = null;
#[Assert\NotBlank(message: 'required', groups: ['step_3'])]
#[Assert\NotBlank(message: 'required', groups: ['step_3', 'contact'])]
public ?string $lastName = null;
#[Assert\NotBlank(message: 'required', groups: ['step_3'])]
#[Assert\Email(message: 'invalid', groups: ['step_3'])]
#[Assert\NotBlank(message: 'required', groups: ['step_3', 'contact'])]
#[Assert\Email(message: 'invalid', groups: ['step_3', 'contact'])]
public ?string $email = null;
#[Assert\NotBlank(message: 'required', groups: ['step_3'])]
#[Assert\NotBlank(message: 'required', groups: ['step_3', 'contact'])]
public ?string $phone = null;
#[Assert\NotBlank(message: 'required', groups: ['step_3'])]
#[Assert\NotBlank(message: 'required', groups: ['step_3', 'contact'])]
public ?string $street = null;
#[Assert\NotBlank(message: 'required', groups: ['step_3'])]
#[Assert\NotBlank(message: 'required', groups: ['step_3', 'contact'])]
public ?string $zip = null;
#[Assert\NotBlank(message: 'required', groups: ['step_3'])]
#[Assert\NotBlank(message: 'required', groups: ['step_3', 'contact'])]
public ?string $city = null;
public ?string $remarks = null;