<?php
namespace App\Form\NuevoIngreso;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\NotBlank;
class BuscaPreregistroType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('curp', TextType::class, [
'constraints' => [
new NotBlank(),
new Length(['min' => 18, 'max' => 18]),
]
])
->add('clur', TextType::class, [
'constraints' => [
new NotBlank(),
// new Length(['min' => 10, 'max' => 10]),
],
])
->add('Buscar', SubmitType::class)
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => null
]);
}
}