Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8290 closed (fixed)

DecimalField does not handle validation of large decimal_places

Reported by: jb0t Owned by: gwilson
Component: Validators Version: master
Severity: Keywords: DecimalField, decimal_places, validation
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 (1)

8290_decimal_field_clean.diff (1.4 KB) - added by dgouldin 6 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 6 years ago by mtredinnick

  • milestone changed from 1.0 beta to 1.0
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 6 years ago by dgouldin

comment:2 Changed 6 years ago by dgouldin

  • Owner changed from nobody to dgouldin

comment:3 Changed 6 years ago by gwilson

  • Owner changed from dgouldin to gwilson
  • Status changed from new to assigned

comment:4 Changed 6 years ago by gwilson

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in [8391].

comment:5 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.