checkValidity test