[Python] How can I validate two dates in a model with Pydantic? end_date greater than init_date

Discussão em 'Python' iniciado por Stack, Outubro 24, 2024.

  1. Stack

    Stack Membro Participativo

    I have a Pydantic model with two dates in it (init_date and end_date)

    I need to ensure that end_date is after init_date, before trying to add to database (it's necessary to calculate the delta in days with these two dates).

    Continue reading...

Compartilhe esta Página