Validating date field

30-Jul-2015 17:48 by 3 Comments

Validating date field

After saving node the required field_date with default $value is empty.

Additional info - Widget : select list - Date format is set to accept only Year, Month, Day - Date entry options : j M Y - H:i:s , -1 years from now , +0 years from now - Tested with both required and non-required settings.

This error occurs also on fields set to "none" rather than just "now".

I have a panel set up with both fields not exposed and are both optional.

I have rules set up to auto-add a value to each field after saving the node.

It works fine when both fields are visible in the panel, but not when I remove them.

Ok, I've fixed my runtime error by setting my field_ticker_timestamp field as follows: $form['field_ticker_timestamp']['#access'] = FALSE; Hope this helps someone else.

By the way, I see a new release 2.9 but from the release note, it does not appear this issue is fixed.

I ran into this issue and discovered that the cause was that a multi-value field with over 600 entries in the form above my date field was causing $form_state['input'] to have null values and $form_state['values'] to not have any updates. I didn't have time to debug the Drupal Form API and how it populates $form_state, but my workaround was to disable my multi-value field if it has over 100 entries.

That allowed date_combo_validate() to validate my field correctly.

Same problem I'm removing the field programmatically using ['#access'] = FALSE; The form renders without the date field, but upon submission the error occurs: The dates are invalid. It doesn't matter if default value is set to now or none.

Tried Date 7 - 2.9, as well as the dev version dated 2015-Oct-02 Workaround I don't have a solution, but in order to be able to proceed with my current setup, I documented-out the code that is creating this false error.

Line 572 of date_now reads: //$errors[] = t('The dates are invalid.'); The error that prevented the form submission is now gone, and field validation still takes place for other more normal scenarios.

  1. first emails internet dating 06-Jan-2016 19:34

    Tags: 3D Adventure Big Dicks Big Tits Blow Job Brunettes Cumshot Erotic Games Games Group Sex High resolution HTML Games Interracial Sex Lesbians Logical Masturbation Oral Sex Over 18 Puzzle Quests Sex Sexy Ass Sexy Babes Simulators Skill Based Tactics [change] Description: Your friend Jon set you up on a blind date with Amy.

  2. Video sex chat online one to one 06-Apr-2016 10:56

    Asides the advice blogs in the latest two posts, the Internet is also full of personal blogs that deal mainly with relationships and dating.

  3. common dating mistakes men 26-Apr-2016 06:06

    It’s a neatly organized classy theme with minimalist style.

  4. dating in colombo 31-May-2015 09:10

    It can be found in the ‘Other Sites’ section of the SITES page.