Question
Date format validation
Users are required to enter their date of birth in the format dd/mm/yyyy. Which two options ensure that a user provides a date in the correct format?
1) Use a Calendar control to allow the user to select the date.
2) Use a Validate rule to test the value entered by the user.
3) Use an Edit Validate rule to test the value entered by the user.
We can choose 3, since Edit validate verify the format. What would be the next choice? They both seems correct. Please explain. Thanks.
In my opinion, using a calendar control allowing user to select a date as opposed to entering a date manually is the best option. This will reduce the number of validations we need to add. Also, it will reduce typo errors (adding negative numbers, missing a /, etc.). With calendar control, we can also choose a display format.