1
0
-1

What is the best way to validate the date picker widget for date of birth / age over 18 and masking in maestro?

On the widget its self or using a data field calculation? Can I then ensure that the validation message is focused on the date object? 

Date picker widget returns a string so I have gone that route for validation creating a date object.

I will likely utilize a js library / function for the masking - there will be other fields that utilize this also. 

Thank you,

Kristan

 

 

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Kristan,

      I would suggest validation on the field text value as you're currently proposing so that manual date entry (non-datepicker) is also handled.

      You can also setup some datepicker defaults so that users cannot select a date less than 18 years ago (for example). Here's the datepicker API details: https://api.jqueryui.com/datepicker/

      One method of targeting a specific datepicker instance is to add a custom CSS class to the field as suggested in this Knowledge Base article: https://support.avoka.com/kb/x/GIDHAQ

      Cheers,

      Matt

        CommentAdd your comment...