add unit test for date validation