date validation bug