I want that a field be required for the user when making a blog post just if other field(BooleanField) is True. If it's False, it would be okay if the user doesn't complete anything. How can I do it?
Let's say I have this model
class Post(models.Model):
name = models.CharField(max_lenght=50)
is_female = models.BooleanField()
age = models.IntegerField()
So, I want that the age attribute be required just if the is_female is True
Thanks!