def platform_validator(domain):
    def validator(value):
        """Test if platform exists."""
        if value is None:
            raise vol.Invalid('platform cannot be None')
        if get_platform(domain, str(value)):
            return value
        raise vol.Invalid(
            'platform {} does not exist for {}'.format(value, domain))
    return validator
Returns this message in an over-the-wire format.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/helpers/config_validation.py/platform_validator--crossover with--dataset/ETHPy150Open google/python-adb/adb/adb_protocol.py/AdbMessage.Pack