improve date validation error handling