Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2793

Trying to set an invalid date string as a date results in Mongoid::Errors::InvalidTime (3.0.21)

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.1.0
    • Component/s: None
    • Labels:

      Description

      Hey guys

      We used 3.0.5 before, where setting an invalid string as a date resulted in Mongoid converting the string into 1st january of 1970.

      Now we updated to 3.0.21 where this behavior changed: now a Mongoid::Errors::InvalidTime is thrown, and this happens before any validations kick in.

      This can't be expected behavior, can it? Please take a look at it, thank you.

        Attachments

          Activity

            People

            Assignee:
            durran Durran Jordan
            Reporter:
            jmuheim jmuheim
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: