components/policy/tools/schema_validator.py
def _ValidatePattern(self, pattern):
    """Validates a regex |pattern|.

    Validates that |pattern| is a string and can be used as regex pattern.
    Args:
      pattern (str): The regex pattern.
    """
    if not isinstance(pattern, str):
      self._Error("Pattern must be a string: %s" % pattern)
    try:
      re.compile(pattern)
    except re.error:
      self._Error("Pattern is not a valid regex: %s" % pattern)
Validates a regex |pattern|.

    Validates that |pattern| is a string and can be used as regex pattern.
    Args:
      pattern (str): The regex pattern.
    
Validates a regex |pattern|.
Validates that |pattern| is a string and can be used as regex pattern.
Validates a regex |pattern| . Validates that |pattern| is a string and can be used as regex pattern .
def _ValidatePattern(self, pattern):
    if not isinstance(pattern, str):
      self._Error("Pattern must be a string: %s" % pattern)
    try:
      re.compile(pattern)
    except re.error:
      self._Error("Pattern is not a valid regex: %s" % pattern)
def _ValidatePattern ( self , pattern ) : if not isinstance ( pattern , str ) : self . _Error ( "Pattern must be a string: %s" % pattern ) try : re . compile ( pattern ) except re . error : self . _Error ( "Pattern is not a valid regex: %s" % pattern )
Validates a regex |pattern|.
Validates a regex |pattern| .
"""Validates a regex |pattern|.

    Validates that |pattern| is a string and can be used as regex pattern.
    Args:
      pattern (str): The regex pattern.
    """
self
pattern
The regex pattern.
The regex pattern .