title: How to use values from list as pydantic validator?
body: <p>I would like to create pydantic model to validate users form.
  one of my model values should be validated from a list of names.
  I succeed to create the model using enum as follow:</p>
  <pre><code>from enum import Enum
  class Fruit(str, Enum):
      APPLE = 'apple'
      BANANA = 'banana'
      MELON = 'melon'
  
  from pydantic import BaseModel
  class UserForm(BaseModel):
      fruit: Fruit
      name: str
  </code></pre>
  <p>Now I would like to switch the enum to a list of values in my code:</p>
  <pre><code>fruit = ['apple','banana','melon']
  </code></pre>
  <p>How can I manage to do so?</p>
  <p>tnx</p>