def _ValidateMatch(regex, value, message):
 matcher = regex.match(value)
 if (not matcher):
  raise validation.ValidationError(message)
 return matcher

def _ValidateMatch ( regex , value , message ) : matcher = regex . match ( value ) if ( not matcher ) : raise validation . ValidationError ( message ) return matcher
validate value matches regex .