class_docstr: Validator for enums.
class_docstr_tok: ["Validator","for","enums","."]
code: def validate(self, value):
      if value not in self.choices:
          tpl = "Value '{val}' is not a valid choice."
          raise ValidationError(tpl.format(val=value))
  
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 Enum obj's underlying member method code with example usage: obj.validate(value) without return types