Added basic date validation.