added date validation and custom message error