<?php
namespace Platform\SecurityBundle\Form\Type;
use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaV3Type;
use EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrueV3;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints\NotBlank;
/**
* Class ResetPasswordRequestType
* @package Platform\SecurityBundle\Form\Type
*/
final class ResetPasswordRequestType extends AbstractType
{
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('email', EmailType::class, array(
'label' => 'Email',
'constraints' => array(
new NotBlank(),
),
))
->add('recaptcha', EWZRecaptchaV3Type::class, array(
'mapped' => false,
'constraints' => array(
new IsTrueV3(),
),
))
;
}
}