This is actually a date. As you know that dates in PHP are YYYY-MM-DD format.
For the sake of user display, I change YYYY-MM-DD to DD/MM/YYYY. Now, here it is possible that a user might enter ddmmyyyy (without any seperator). So I need to compare that input with the format (dd/mm/yyyy).
If the format is incorrect then a error should be generated 🙂