def check_value(self, value, path, property_name, **kwargs):
    'Check Value'
    matches = []
    allowed_value_specs = kwargs.get('value_specs', {}).get('AllowedValues', {})
    if allowed_value_specs:
        if (str(value) not in allowed_value_specs):
            message = 'You must specify a valid value for {0} ({1}).\nValid values are {2}'
            matches.append(RuleMatch(path, message.format(property_name, value, allowed_value_specs)))
    return matches
Check Value
def check_value(self, value, path, property_name, **kwargs):
    
    matches = []
    allowed_value_specs = kwargs.get('value_specs', {}).get('AllowedValues', {})
    if allowed_value_specs:
        if (str(value) not in allowed_value_specs):
            message = 'You must specify a valid value for {0} ({1}).\nValid values are {2}'
            matches.append(RuleMatch(path, message.format(property_name, value, allowed_value_specs)))
    return matches