How to validate based on specific Enum member in a Fastapi Pydantic model
How to validate based on specific Enum member in a Fastapi Pydantic model Question: Here is my Pydantic model: from enum import Enum from pydantic import BaseModel class ProfileField(str, Enum): mobile = "mobile" email = "email" address = "address" interests ="interests" # need list of strings class ProfileType(str, Enum): primary = "primary" secondary = "secondary" …