Add 'valid' property and 'isValid' method