Replace 'isValid' method with 'isValidFor'