class_docstr: Validator for regular expressions.
class_docstr_tok: ["Validator","for","regular","expressions","."]
docstr: Validate value.
docstr_tok: ["Validate","value","."]
code: def validate(self, value):
      """Validate value."""
      flags = self._calculate_flags()
  
      try:
          result = re.search(self.pattern, value, flags)
      except TypeError as te:
          raise ValidationError(*te.args)
  
      if not result:
          raise ValidationError(
              'Value "{value}" did not match pattern "{pattern}".'.format(
                  value=value, pattern=self.pattern
              )
          )
  
imports: import re
  from six.moves import reduce
  from .errors import ValidationError
  from .None import utilities
label_desc: Use image node_id 2 for calling the Regex obj's underlying member method code with example usage: obj.validate(value) without return types