Add date validation to add and edit