validates date