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

Incorrect validation in forms' date fields



      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.


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

          Issue Links



              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created:
                  Days since last comment:
                  49 weeks, 1 day ago


                  Version Package
                  7.0.0 DXP FP71
         DXP SP11