title: Dynamic default value from a different Pydantic model
body: <p>Example code:</p>
  <pre><code>class MyModel(BaseModel):
      name: str = &quot;examplename&quot;
  
  class MySecondModel(BaseModel):
      derivedname: Optional[str]
      @validator('derivedname')
      def default_name(cls, v, *, values, **kwargs):
          return v or values[MyModel.name]  # psuedocode, doesn't work
  </code></pre>
  <p>I know this works when the field is in the same class, and have no issues with that. However I'd like to give a default value based on a field in an instance of a different pydantic model.</p>
  <p>Of course I could just take the model in my code and programmatically do this, but I'd like to avoid that for quite obvious reasons.</p>
  <p>Is this possible or am I wasting my time?</p>