Added support for validating date fields.