Hi,

In my models I've some FloatFields that must be > 0. I'm wondering what is the 
best way to check, at the model level (not form), that the values for these 
Fields are greater than 0? Browsing the documentation I've found the following 
three methods:

Add the MinValueValidator to each field.
Check them in the model.clean() method
Create a custom field that accept only floats > 0.

And, if a choose the custom field, which FloatField's method do I need to 
override to check that the value is > 0?

Best regards,
e.p.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/DDD1702B-CA41-4A8B-94DC-76C8D6B39EDD%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to