docs: def validate(self, value):
          """Validate field value."""
          if self.required and value is None:
              raise ValidationError("field is required")
  
          if value is not None and self.choices is not None:
              choices = [choice for choice, _ in self.choices]
              if value not in choices:
                  raise ValidationError("field must be one of: {}".format(
                      ", ".join(choices),
                  ))