def match_all(value):
"""Validator that matches all values."""
return value
# def platform_validator(domain):
# """Validate if platform exists for given 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
评论列表
文章目录