Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-8866

Wrong date should not be accepted

    XMLWordPrintable

Details

    • date, validation, field
    • Unknown
    • N/A
    • N/A

    Description

      When you write a bad date such as "42/14/2012" in a date field in an object, the wiki silently changes it to a valid date, which does not make any sense.

      What should happen: a message says to the user that the date he wrote is bad.

      Steps to reproduce :

      1/ Create a class called "MyTests.TestClass".
      2/ Add a "mydate" field of type "Date", with default Date format "dd/MM/yyyy" (but the bug happens with all date formats).
      3/ Create a page class "MyTests.DateTest".
      4/ Go to object edit mode, and add an object of type "MyTests.TestClass".
      5/ Inside your new object, set the "mydate" field to this value: "42/14/2012" or any else bad date. Save.
      6/ Go back to the object editor, and see that the bad date was converted to a valid date.

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              gdelhumeau Guillaume Delhumeau
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: