Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

validate on serializer or model

Relieved Reindeer answered on February 4, 2023 Popularity 9/10 Helpfulness 3/10

Contents


More Related Answers

  • serializers.py include all fields
  • drf serializer general validate method
  • drf model serializers
  • can serializer returns an object in django
  • drf model methods serializer
  • model serializer django

  • validate on serializer or model

    0

    You should use an object wide validation (validate()), since validate_date will never be called since date is not a field on the serializer. From the documentation:

    Popularity 9/10 Helpfulness 3/10 Language whatever
    Tags: model whatever
    Link to this answer
    Share Copy Link
    Contributed on Feb 04 2023
    Relieved Reindeer
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.