Error message is showing in the form even if the date field is filled