3👍
✅
Override clean
on the model? The validation process is described in detail in the doc, which includes use of this method to implement custom validation. Since it’s a bound method it has access to self
and thence self.account.balance
.
Source:stackexchange.com