Add tests for both text and date validation