diff --git a/src/ApplePayPayment/Form/Type/GatewayConfigurationType.php b/src/ApplePayPayment/Form/Type/GatewayConfigurationType.php index 6d760cbf..48077df1 100644 --- a/src/ApplePayPayment/Form/Type/GatewayConfigurationType.php +++ b/src/ApplePayPayment/Form/Type/GatewayConfigurationType.php @@ -7,6 +7,7 @@ use CommerceWeavers\SyliusTpayPlugin\Form\Type\AbstractTpayGatewayConfigurationType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Validator\Constraints\NotBlank; final class GatewayConfigurationType extends AbstractTpayGatewayConfigurationType { @@ -23,6 +24,10 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'label' => 'commerce_weavers_sylius_tpay.admin.gateway_configuration.apple_pay_merchant_id', 'required' => true, 'priority' => -250, + 'constraints' => [ + new NotBlank(allowNull: false, groups: ['sylius']), + ], + 'validation_groups' => ['sylius'], ], ) ; diff --git a/src/GooglePayPayment/Form/Type/GatewayConfigurationType.php b/src/GooglePayPayment/Form/Type/GatewayConfigurationType.php index 3bc9ae8c..d65a901d 100644 --- a/src/GooglePayPayment/Form/Type/GatewayConfigurationType.php +++ b/src/GooglePayPayment/Form/Type/GatewayConfigurationType.php @@ -7,6 +7,7 @@ use CommerceWeavers\SyliusTpayPlugin\Form\Type\AbstractTpayGatewayConfigurationType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Validator\Constraints\NotBlank; final class GatewayConfigurationType extends AbstractTpayGatewayConfigurationType { @@ -23,6 +24,10 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'label' => 'commerce_weavers_sylius_tpay.admin.gateway_configuration.google_merchant_id', 'required' => true, 'priority' => -250, + 'constraints' => [ + new NotBlank(allowNull: false, groups: ['sylius']), + ], + 'validation_groups' => ['sylius'], ], ) ;