              raise ValidationError, ungettext("Please enter a valid decimal number with at most %s decimal place.",
                  "Please enter a valid decimal number with at most %s decimal places.", self.decimal_places) % self.decimal_places
  
  def isValidFloat(field_data, all_data):
      data = str(field_data)
      try:
          float(data)
      except ValueError:
          raise ValidationError, _("Please enter a valid floating point number.")
  
 
</s> remove __test__ = {'API_TESTS':"""
 </s> add __test__ = {'API_TESTS':u""" </s> remove from django.utils.encoding import force_unicode
 </s> add from django.utils.encoding import force_unicode, smart_str
    data = smart_str(field_data)
              raise ValidationError, ungettext("Please enter a valid decimal number with at most %s decimal place.",
                  "Please enter a valid decimal number with at most %s decimal places.", self.decimal_places) % self.decimal_places
  
  def isValidFloat(field_data, all_data):
    data = smart_str(field_data)
      try:
          float(data)
      except ValueError:
          raise ValidationError, _("Please enter a valid floating point number.")
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #6492 -- Added bullet-proofing to isValidFloat validator. Thanks, Bastian Kleineidam.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7258 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/core/validators.py