date validation fix