Adding Questions

How do I add date validation to an answer?

You have the ability to control what a user can enter in terms of dates. This has TWO options. 

 

The first is Static date validation.

To provide an example of this let's say you have a date field you want to add where the customer can only choose a date in a given financial year.

In this case today's date is not really relevant, what is though is the date range the customer can enter a date within I.e. for the past financial year the date range would be 01/04/2018 and 31/03/2019. This is how you can do this using the new date validation functionality where the range is static:

 

blobid0.png

 

The second is the smarter Dynamic date validation 

This is the one that will be used A LOT by you. So let's say you want a date field to not allow any dates: 

  • earlier than 1 month ago from today AND 
  • not allow dates any further in the future or later than 14 days away from today 

The following illustrates how the new dynamic date validation makes this possible: 

 

blobid1.png

 

The drop down in the above which contains the 'Today' value can be changed to be: 

  • Today 
  • Yesterday 
  • Tomorrow 

 

Today is the default as it is most logical and likely to be used. The 'Operator' drop down can contain: 

  • Plus 
  • Minus 

 

With the defaults set to minus/plus for earliest/latest respectively as it is most logical.  

 

The time span drop down has options of: 

  • Days  
  • Months 
  • Years 

 

Weekly isn't there as one can, for example, use 21 days for 3 weeks.  

 

Finally, note that it is possible to add validation to the earliest valid date but not the latest valid date and vice versa.  And in the same vein you can also say for example: 

  • Earliest date should be static and no earlier than 01/01/2019 
  • Latest date should be dynamic and no more in the future than 3 months