Commit 52edb9db6536858b1df3e7337b17185d5498fd3b
1 parent
3599598a89
Exists in
master
creada la validacion de las fechas de los ascenso
Showing
1 changed file
with
17 additions
and
5 deletions
Show diff stats
src/AppBundle/Form/UserType.php
... | ... | @@ -196,7 +196,10 @@ class UserType extends AbstractType |
196 | 196 | 'attr' => array( |
197 | 197 | 'class' => 'esc_asistente' |
198 | 198 | ), |
199 | - 'years' => range(2003, date("Y")) | |
199 | + 'years' => range(2003, date("Y")), | |
200 | + 'constraints' => array( | |
201 | + new Date(), | |
202 | + ), | |
200 | 203 | )) |
201 | 204 | |
202 | 205 | ->add('documento_asistente', FileType::class, array( |
... | ... | @@ -243,7 +246,10 @@ class UserType extends AbstractType |
243 | 246 | 'attr' => array( |
244 | 247 | 'class' => 'esc_agregado' |
245 | 248 | ), |
246 | - 'years' => range(2003, date("Y")) | |
249 | + 'years' => range(2003, date("Y")), | |
250 | + 'constraints' => array( | |
251 | + new Date(), | |
252 | + ) | |
247 | 253 | )) |
248 | 254 | |
249 | 255 | ->add('documento_agregado', FileType::class, array( |
... | ... | @@ -287,7 +293,10 @@ class UserType extends AbstractType |
287 | 293 | 'attr' => array( |
288 | 294 | 'class' => 'esc_asociado' |
289 | 295 | ), |
290 | - 'years' => range(2003, date("Y")) | |
296 | + 'years' => range(2003, date("Y")), | |
297 | + 'constraints' => array( | |
298 | + new Date(), | |
299 | + ) | |
291 | 300 | )) |
292 | 301 | |
293 | 302 | ->add('documento_asociado', FileType::class, array( |
... | ... | @@ -331,7 +340,10 @@ class UserType extends AbstractType |
331 | 340 | 'attr' => array( |
332 | 341 | 'class' => 'esc_titular' |
333 | 342 | ), |
334 | - 'years' => range(2003, date("Y")) | |
343 | + 'years' => range(2003, date("Y")), | |
344 | + 'constraints' => array( | |
345 | + new Date(), | |
346 | + ) | |
335 | 347 | )) |
336 | 348 | |
337 | 349 | ->add('documento_titular', FileType::class, array( |
... | ... | @@ -364,7 +376,7 @@ class UserType extends AbstractType |
364 | 376 | 'class' => 'btn btn-success btn-block', |
365 | 377 | 'data-loading-text' => "<i class='fa fa-circle-o-notch fa-spin'></i> Procesando Solicitud..." |
366 | 378 | ) |
367 | - )) | |
379 | + )) | |
368 | 380 | |
369 | 381 | |
370 | 382 | ; | ... | ... |