Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixer generate a number higher then MaxValueValidator #84

Open
guinslym opened this issue Jul 25, 2017 · 0 comments
Open

Mixer generate a number higher then MaxValueValidator #84

guinslym opened this issue Jul 25, 2017 · 0 comments

Comments

@guinslym
Copy link

guinslym commented Jul 25, 2017

hi @klen I am having an error with my model when I use as a constraint Min/MaxValueValidator.

from django.core.validators import MinValueValidator, MaxValueValidator

class Course(models.Model):
    number_of_minutes = models.PositiveIntegerField(
            validators=[
            MinValueValidator(12),
            MaxValueValidator(60)
            ]
        )

in the shell

course = mixer.blend(Course)
course.number_of_minutes 
 =>  5645

So I want to know how to have the MaxValueValidator constraint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant