Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django float validator

from django.core.validators import MaxValueValidator, MinValueValidator

...
weight = models.FloatField(
    validators=[MinValueValidator(0.9), MaxValueValidator(58)],
)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #float #validator
ADD COMMENT
Topic
Name
3+8 =