Commit 5b405eae5d2b25b17f97be5076cdb8ddcf8a22c3
1 parent
f8f829e0e4
Exists in
master
mejorada la fecha de ingreso a la ubv y validada
Showing
1 changed file
with
9 additions
and
2 deletions
Show diff stats
src/AppBundle/Form/UserType.php
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | |
10 | 10 | namespace AppBundle\Form; |
11 | 11 | |
12 | +use Symfony\Component\Validator\Constraints\Date; | |
12 | 13 | use Symfony\Component\Validator\Constraints\File; |
13 | 14 | use Symfony\Component\Validator\Constraints\NotBlank; |
14 | 15 | |
... | ... | @@ -31,8 +32,14 @@ class UserType extends AbstractType |
31 | 32 | ->add('fecha_ingreso', BirthdayType::class, array( |
32 | 33 | 'widget' => 'choice', |
33 | 34 | 'label' => 'Fecha de Ingreso UBV', |
34 | - 'data' => new \DateTime("01/01/2003"), | |
35 | - 'years' => range(2003, date("Y")) | |
35 | + 'years' => range(2003, date("Y")), | |
36 | + 'placeholder' => array( | |
37 | + 'year' => 'Año', 'month' => 'Mes', 'day' => 'Día', | |
38 | + ), | |
39 | + 'constraints' => array( | |
40 | + new NotBlank(), | |
41 | + new Date() | |
42 | + ) | |
36 | 43 | )) |
37 | 44 | ->add('trabajo', FileType::class, array( |
38 | 45 | 'label' => 'Digital Constancia Trabajo', | ... | ... |