Date validation to be compatible with DBs date fields