django models validation error code example
Example: django float validator
from django.core.validators import MaxValueValidator, MinValueValidator
...
weight = models.FloatField(
validators=[MinValueValidator(0.9), MaxValueValidator(58)],
)
from django.core.validators import MaxValueValidator, MinValueValidator
...
weight = models.FloatField(
validators=[MinValueValidator(0.9), MaxValueValidator(58)],
)