I use a pydantic class to create a profile with field validations like email for example. When I create a single profile, these validations are necessary. But when I massively add dozens of profiles to a list of profiles, I would like this validation to disappear because I will later check each profile by browsing the list. The idea is that I don't want a massive scrap to be stopped if a profile isn't good. We know that sometimes scrap has waste.
I don't want to loose Email validation when creating 1 profil
How do you do this please?
class Profil(BaseModel):
pseudo: str
mail: EmailStr
page_url: str
social_network: str
created_date: datetime = Field(default_factory=datetime.now)
In my DTO file for bulk insert where I don't want Raise ValueError if email is not correct
class InsertListProfilInputDto(BaseModel):
"""Input Dto for bulk insert of profil"""
data: list[Profil]
Thank you
EmailStr?