On 10/15/2010 9:18 PM, refreegrata wrote: > Now works. > validators=[MaxValueValidator(Decimal('14.5')) > > But I must to do an explicit declaration Decimal('14.5'). > > Somebody knows why?
Because only decimal numbers can give exact comparisons to arbitrary decimal values. You would not want your input to validate correctly with an entry of (say) 14.500000000000001, which might be possible if the limit was expressed as a floating-point number. regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.