<?php

namespace AppBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\NotBlank;

class RecoveryType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add(
                'email',
                null,
                array(
                    'label' => false,
                    'constraints' => array(
                        new Email(),
                        new NotBlank()
                    )
                )
            );
    }

    public function getName()
    {
        return 'recovery';
    }
}