'Validate that the input contains (or does *not* contain, if
inverse_match is True) a match for the regular expression.'

def __call__(self, value):

    regex_matches = bool(self.regex.search(str(value)))
    invalid_input = (regex_matches if self.inverse_match else (not regex_matches))
    if invalid_input:
        raise ValidationError(self.message, code=self.code)
