'Return whether a value satisfies this key\'s constraints.'

def validate(self, value):

    if self.valid_types:
        if (not isinstance(value, self.valid_types)):
            return False
    if self.valid_values:
        if (value not in self.valid_values):
            return False
    if self.valid_regex:
        if (not self.valid_regex.search(str(value))):
            return False
    return True
