check validity period