Django

Code

Ticket #8290 (closed: fixed)

Opened 4 months ago

Last modified 4 months ago

DecimalField does not handle validation of large decimal_places

Reported by: jb0t Assigned to: gwilson
Milestone: 1.0 Component: Validators
Version: SVN Keywords: DecimalField, decimal_places, validation
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

If decimal_places is set to 2, and a number like 0.0000000001 tries to get validated, it passes when it should fail. If you make a form and look at the cleaned data for a DecimalField?, you will see that a number like .0000001 looks something like the notation 1E-8, of the decimal.Decimal type.

Attachments

8290_decimal_field_clean.diff (1.4 kB) - added by dgouldin on 08/15/08 11:27:40.

Change History

08/13/08 13:45:12 changed by mtredinnick

  • needs_better_patch changed.
  • needs_docs changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • milestone changed from 1.0 beta to 1.0.

08/15/08 11:27:40 changed by dgouldin

  • attachment 8290_decimal_field_clean.diff added.

08/15/08 11:28:12 changed by dgouldin

  • owner changed from nobody to dgouldin.

08/15/08 14:14:29 changed by gwilson

  • owner changed from dgouldin to gwilson.
  • status changed from new to assigned.

08/15/08 15:10:27 changed by gwilson

  • status changed from assigned to closed.
  • resolution set to fixed.

fixed in [8391].


Add/Change #8290 (DecimalField does not handle validation of large decimal_places)




Change Properties
Action