django float validator

38

from django.core.validators import MaxValueValidator, MinValueValidator

...
weight = models.FloatField(
    validators=[MinValueValidator(0.9), MaxValueValidator(58)],
)

Comments

Submit
0 Comments