]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Form/DisputeType.php
Fix buildForm to match upstream prototype and return value
[airbundle] / Form / DisputeType.php
index 4bf9285d32b364e2982366de213d9feb4c19b3d8..77dbffa94bbcb63d5b3862b38c93e8f68c0ebc73 100644 (file)
@@ -17,11 +17,11 @@ class DisputeType extends AbstractType {
         */
        public function buildForm(FormBuilderInterface $builder, array $options) {
                return $builder
-                       ->add('offense', ChoiceType::class, ['choices' => ['Forbidden gathering' => 'gathering', 'Traffic at prohibited time' => 'traffic'/*, 'Traffic at prohibited location' => 'location'*/], 'attr' => ['placeholder' => 'Your offense'], 'constraints' => [new NotBlank(['message' => 'Please provide your offense'])]])
-                       ->add('court', TextType::class, ['label' => 'Court city', 'attr' => ['placeholder' => 'Your court city'], 'constraints' => [new NotBlank(['message' => 'Please provide your court city'])]])
-                       ->add('notice', TextType::class, ['label' => 'Notice number', 'attr' => ['placeholder' => 'Your notice number'], 'constraints' => [new NotBlank(['message' => 'Please provide your notice'])]])
-                       ->add('agent', TextType::class, ['label' => 'Agent number', 'attr' => ['placeholder' => 'Your agent number'], 'constraints' => [new NotBlank(['message' => 'Please provide your agent'])]])
-                       ->add('service', TextType::class, ['label' => 'Service code', 'attr' => ['placeholder' => 'Your service code'], 'constraints' => [new NotBlank(['message' => 'Please provide your service'])]])
+                       ->add('offense', ChoiceType::class, ['choices' => ['Forbidden gathering' => 'gathering', 'Traffic at prohibited time' => 'traffic'/*, 'Traffic at prohibited location' => 'location'*/], 'attr' => ['placeholder' => 'Your offense'], 'constraints' => [new NotBlank(null, 'Please provide your offense')]])
+                       ->add('court', TextType::class, ['label' => 'Court city', 'attr' => ['placeholder' => 'Your court city'], 'constraints' => [new NotBlank(null, 'Please provide your court city')]])
+                       ->add('notice', TextType::class, ['label' => 'Notice number', 'attr' => ['placeholder' => 'Your notice number'], 'constraints' => [new NotBlank(null, 'Please provide your notice')]])
+                       ->add('agent', TextType::class, ['label' => 'Agent number', 'attr' => ['placeholder' => 'Your agent number'], 'constraints' => [new NotBlank(null, 'Please provide your agent')]])
+                       ->add('service', TextType::class, ['label' => 'Service code', 'attr' => ['placeholder' => 'Your service code'], 'constraints' => [new NotBlank(null, 'Please provide your service')]])
                        ->add('abstract', TextareaType::class, ['attr' => ['placeholder' => 'Your abstract', 'cols' => 50, 'rows' => 15], 'constraints' => []])
                        ->add('submit', SubmitType::class, ['label' => 'Send', 'attr' => ['class' => 'submit']]);
        }