def set_validator(self, validator): """ Set the validator for the underlying widget. """ if validator is None: self._validator = null_validator self._validator_message = '' else: self._validator = make_validator(validator) self._validator_message = validator.get('message', '')
def set_validator(self, validator): """ Sets the validator for the control. """ if validator is None: self._validator = null_validator self._validator_message = '' else: self._validator = make_validator(validator) self._validator_message = validator.get('message', '')