Django model field “null together or not at all” constraint
I need a way to create either a validator or a constraint at model level to evaluate two or more fields to be able to be null/blank only if all of them are null/blank at the same time.
I need a way to create either a validator or a constraint at model level to evaluate two or more fields to be able to be null/blank only if all of them are null/blank at the same time.