#28562: DecimalValidator raises ValidationError for decimals in scientific
notation
-------------------------------------------+------------------------
Reporter: Maksim Iakovlev | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
{{{
>>> validator = DecimalValidator(20, 2)
>>> value = Decimal('7.42403889818E+17')
>>> try:
... validator(value)
... except Exception as e:
... print(e)
...
[u'Ensure that there are no more than 2 decimal places.']
>>> value = Decimal(742403889818000000)
>>> try:
... validator(value)
... except Exception as e:
... print(e)
...
>>>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28562>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.22ed806c648d88e649d0131411ff0108%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.