from django.db import models
from django.core.validators import MaxValueValidator, MinValueValidator
class Match(models.Model):
overs = models.IntegerField(validators=[MinValueValidator(1), MaxValueValidator(100)])
I've tried using the PositiveIntegerField but I believe that you cannot set a max value for that through Django - I'm not sure.