diff --git a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Form/Entity/OidcngEntityType.php b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Form/Entity/OidcngEntityType.php index b88fcc549..6efdcfa0a 100644 --- a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Form/Entity/OidcngEntityType.php +++ b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Form/Entity/OidcngEntityType.php @@ -249,10 +249,15 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'typeOfService', ChoiceType::class, [ - 'required' => false, + 'required' => true, 'choices' => $this->typeOfServiceProvider->getTypesOfServiceChoices(), 'choice_value' => fn(TypeOfService $tos): string => $tos->typeEn, 'choice_label' => fn(TypeOfService $tos): string => $tos->typeEn, + 'choice_attr' => fn(): array => [ + 'class' => 'decorated', + 'data-parsley-mincheck' => 1, + 'data-parsley-maxcheck' => 3, + ], 'expanded' => true, 'multiple' => true, 'attr' => [ diff --git a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Form/Entity/SamlEntityType.php b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Form/Entity/SamlEntityType.php index aa6425fad..4c31d436b 100644 --- a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Form/Entity/SamlEntityType.php +++ b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Form/Entity/SamlEntityType.php @@ -241,10 +241,15 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'typeOfService', ChoiceType::class, [ - 'required' => false, + 'required' => true, 'choices' => $this->typeOfServiceProvider->getTypesOfServiceChoices(), 'choice_value' => fn(TypeOfService $tos): string => $tos->typeEn, 'choice_label' => fn(TypeOfService $tos): string => $tos->typeEn, + 'choice_attr' => fn(): array => [ + 'class' => 'decorated', + 'data-parsley-mincheck' => 1, + 'data-parsley-maxcheck' => 3, + ], 'expanded' => true, 'multiple' => true, 'attr' => [