Changed visibility of verifyValidity so that the android app can use it