Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-87317

Incorrect validation in forms' date fields

Details

    Description

      Steps to reproduce de issue:
       
      1. Add a new form with a date field.
      2. Publish the form.
      3. Enter a valid date using the date picker.
      4. Select the text the date picker entered in the field.
      5. Write 'hello' instead.
      6. Send the form.
       

      Expected result : you get an error message telling you entered an invalid date.

      Current result :
      No error message is showed.
      If you have a look at the new entry you just created for the form, you will see that the current date has been saved. This is because of when an invalid date is entered it is converted to current date and then it is sent.


      The fix consists in avoiding to enter letters; so, only numbers and slash characters are allowed. Also, the date length is limited to 10 characters: MM/DD/YYYY
      If user enters an invalid date (as 00000000) it will be converted to current date and will send to server.

      Attachments

        1. date-70x.gif
          date-70x.gif
          1.50 MB
        2. date-master.gif
          date-master.gif
          4.32 MB
        3. form-date-70x.gif
          form-date-70x.gif
          4.50 MB
        4. form-date-master.gif
          form-date-master.gif
          4.96 MB

        Issue Links

          Activity

            People

              louis.zhang Louis Zhang (Inactive)
              cristina.rodriguez Cristina Rodriguez
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3 years, 31 weeks, 6 days ago

                Packages

                  Version Package
                  7.0.0 DXP FP71
                  7.0.10.11 DXP SP11
                  7.0.X