I've modified date types in my forms to include ---- ---- -----, as an option, because sometimes users do not want to enter a date.
However, this causes "The specified date is invalid" error message.
However, I don't use date_validate in my form validate function. Therefore, Drupal devs must be forcing all date fields to go through such validation and that's just not good.

How do I override this temporarily without modifying form.inc?

Comments

executex’s picture

Component: forms system » system.module

Seems to be in system, gonna see if I can modify '#element_validate' => array('date_validate')

executex’s picture

Category: bug » support
Priority: Normal » Minor
Status: Active » Fixed

You know what, it seems like you can do that in #process.


    $element['#element_validate'] = array();

Status: Fixed » Closed (fixed)
Issue tags: -date, -validation, -date display validation

Automatically closed -- issue fixed for 2 weeks with no activity.