src/Form/RegistrationFormType.php line 17
<?phpnamespace App\Form;use App\Entity\User;use Symfony\Component\Form\AbstractType;use Symfony\Component\Form\Extension\Core\Type\CheckboxType;use Symfony\Component\Form\Extension\Core\Type\PasswordType;use Symfony\Component\Form\Extension\Core\Type\RepeatedType;use Symfony\Component\Form\Extension\Core\Type\TextType;use Symfony\Component\Form\FormBuilderInterface;use Symfony\Component\OptionsResolver\OptionsResolver;use Symfony\Component\Validator\Constraints\IsTrue;use Symfony\Component\Validator\Constraints\Length;use Symfony\Component\Validator\Constraints\NotBlank;class RegistrationFormType extends AbstractType{public function buildForm(FormBuilderInterface $builder, array $options): void{$builder->add('email',TextType::class,['label' => false, 'translation_domain' => 'translation','attr' => ['placeholder' => 'email'],])->add('firstname',TextType::class,['label' => false, 'translation_domain' => 'translation','attr' => ['placeholder' => 'First Name']])->add('lastname',TextType::class, ['label' => false,'translation_domain' => 'translation','attr' => ['placeholder' => 'Last Name']])->add('plainPassword', RepeatedType::class, ['type' => PasswordType::class,'translation_domain' => 'translation','first_options' => ['label' => false,'attr' => ['placeholder' => 'Password']],'second_options' => ['label' => false,'attr' => ['placeholder' => 'Password.Reapet']],'mapped' => false,'attr' => ['autocomplete' => 'new-password'],'constraints' => [new NotBlank(['message' => 'passwordblack',]),new Length(['min' => 8,'minMessage' => 'passwordLength',// max length allowed by Symfony for security reasons'max' => 4096,]),],])->add('agreeTerms', CheckboxType::class, ['label' => 'agreeTerms', 'translation_domain' => 'translation','mapped' => false,'attr' => ['class'=>'checkbox-inline'],'constraints' => [new IsTrue(['message' => 'You should agree to our terms.',]),],]);}public function configureOptions(OptionsResolver $resolver): void{$resolver->setDefaults(['data_class' => User::class,]);}}