I have this model I\'m showing in the admin page:
class Dog(models.Model):
bark_volume = models.DecimalField(...
unladen_speed = models.DecimalField(...
The simplest way to validate this particular case would be:
from django.core.validators import MinValueValidator
from django.utils.translation import ugettext_lazy as _
class Dog(models.Model):
bark_volume = models.DecimalField(
..., validators=[MinValueValidator(5, message=_("Must be louder!"))]
Django's documentation about validators: https://docs.djangoproject.com/en/dev/ref/validators/