From: Raphaƫl Gertz Date: Sat, 28 Aug 2021 11:11:03 +0000 (+0200) Subject: Remove pseudonym requirement X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/8749749c6794a9f033655b63ab3250ae4fa1e898 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