code: def validate(self, value):
          
          if not self._compiled_regex.match(value):
              raise ValidationError(
                  'value {:s} not match r"{:s}"'.format(value, self._regex))
docs: Validate string by regex
          :param value: str
          :return: