Python function to validate user inputted date of birth.