date validation working