Changes between Initial Version and Version 1 of Ticket #28562, comment 6
- Timestamp:
- Jan 26, 2018, 10:50:12 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28562, comment 6
initial v1 5 5 {{{ 6 6 class UpdateBalanceForm(forms.Form): 7 id = forms.ModelChoiceField(ProductPortfolio.objects.all(), required=True)8 7 balance = forms.DecimalField(decimal_places=2, max_digits=16, required=True) 9 8 }}} … … 12 11 13 12 {{{ 14 form = UpdateBalanceForm({' id':1, 'balance':Decimal('5.420575188741E-12')})13 form = UpdateBalanceForm({'balance':Decimal('5.420575188741E-12')}) 15 14 form.is_valid() 16 15 False 17 16 form.errors 18 {' id': ['Select a valid choice. That choice is not one of the available choices.'], 'balance': ['Ensure that there are no more than 16 digits in total.']}17 {'balance': ['Ensure that there are no more than 16 digits in total.']} 19 18 }}} 20 19 21 20 This is surprising because the value has 13 digits minus the scientific notation 21 22 edit 1: Simplified example