From: Raphaƫl Gertz Date: Sat, 28 Aug 2021 11:11:03 +0000 (+0200) Subject: Remove pseudonym requirement X-Git-Tag: 0.2.0~2 X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/airbundle/commitdiff_plain/1e64ab56695919b096eefdf5d50cbe609de1a269?ds=sidebyside Remove pseudonym requirement --- diff --git a/Form/RegisterType.php b/Form/RegisterType.php index 9cf939d..0e0395f 100644 --- a/Form/RegisterType.php +++ b/Form/RegisterType.php @@ -15,7 +15,6 @@ use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\TelType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\Validator\Constraints\NotBlank; class RegisterType extends \Rapsys\UserBundle\Form\RegisterType { /** @@ -32,7 +31,7 @@ class RegisterType extends \Rapsys\UserBundle\Form\RegisterType { //Add extra pseudonym field if (!empty($options['pseudonym'])) { - $form->add('pseudonym', TextType::class, ['attr' => ['placeholder' => 'Your pseudonym'], 'constraints' => [new NotBlank(['message' => 'Please provide your pseudonym'])]]); + $form->add('pseudonym', TextType::class, ['attr' => ['placeholder' => 'Your pseudonym'], 'required' => false]); } //Add extra slug field