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

As a form creator, I want to define validations to my date field type with custom dates as parameter



      Design Deliverable



      For our customers, in many use cases dates need to have validations, so the user can't input a value that is invalid, we have this kind of validation for numeric and text fields already through the UI.

      Some use cases that we need to cover for date pick validation are:

      • When an agent or customer/prospect is trying to buy an insurance policy online using Liferay Forms, they need to pick an effective date for their policy.  This policy effective date has to be greater than the current date but cannot exceed past 30 days of current date (some insurance policies have different rules about the 30 days - can be 60 days, for example).  Insurance companies have an eligibility date range because that policy effective date helps determine what rates to apply to the quote. 
      • Having the date range also helps ensure that the person buying the policy is not fraudulent - For example, if I get into a car accident today and don't have insurance, I will try to buy insurance online with a policy effective date of yesterday so that I can file a claim with my insurance company to avoid paying for the accident out-of-pocket. Insurance companies avoid fraud like this by having rules that state their policy cannot be effective until at least the next day of purchase.

      Acceptance Criteria

      1 - Given an admin user,
      when adding a date field,
      then I must be able add validations for it

      2 - Given an admin user,
      when adding a validation to my date field,
      then I must be able to calculate dates from the parameter that was choosen

      3 - Given an form creator,
      when adding a validation from a custom date,
      then I must be able to calculate dates using the following units: days, months and years

      • The user must be able to calculate only up to 3 digits (maximum = 999)

      4 - Given a user,
      when filling a form with date fields with validation,
      then I must only be able to submit/change page of the form with dates that pass the validations

      Definition of Done (DoD):

      • All Acceptance Criteria were passed;
      • Make sure that the expected automated tests were created (unit / integration / functional) and passed successfully;
      • Code with peer review completed;
      • Validated by QA, Product Designer and/or PM;
      • No critical bug related to Story scope (ex.: similar of FP4, FP5);
      • Make sure that all system documentation were updated (if necessary)
      • Make sure that it has the extensions points needed to allow GS and customers to customize the feature (If applicable)


        Issue Links



              luiz.jardim Luiz Jardim
              luiz.jardim Luiz Jardim
              Luiz Jardim Luiz Jardim
              Kiyoshi Lee Kiyoshi Lee
              0 Vote for this issue
              0 Start watching this issue




                  Version Package
                  7.4.13 DXP GA1
         CE GA4