How to change error messsage I am getting in django for foreign key

Below is my code

funding = models.ForeignKey(TblHcrMasterLookupOptions, models.DO_NOTHING, null=True,blank=True, related_name='%(class)s_funding',)

tpa_for_reference_year =  models.ForeignKey(TblHcrVendors, models.DO_NOTHING, null=True,blank=True, related_name='%(class)s_tpa')

pbm_for_reference_year =  models.ForeignKey(TblHcrVendors, models.DO_NOTHING, null=True,blank=True, related_name='%(class)s_pbm')

I am getting this error message

"renewal_month": [ "Incorrect type. Expected pk value, received str." ], "funding": [ "Incorrect type. Expected pk value, received str." ], "pbm_for_reference_year": [ "Incorrect type. Expected pk value, received str." ],

I want to change the error message and want my custom error message

Back to Top