klipstein/dojango — Issue #81: 83 - Widget.max_digits is ignored by Dojango. 
Author: klipstein
Created: 2011-11-06 13:36:55+00:00
State: open

What steps will reproduce the problem?
1. Create django form that contains DecimalField with max_digits set o X.
2. Open page in a browser
3. Try to inset more than X digits into that field.

What is the expected output? What do you see instead?
Dojango should display warning message or prevent from inserting more digits, but nothing like that happens.

What version of the product are you using? On what operating system?
Django 1.3, Dojango trunk.

Please provide any additional information below.

Here is the cause:

class DojoWidgetMixin:
default_field_attr_map = { # the default map for mapping field attributes to dojo attributes
'required':'required',
'help_text':'promptMessage',
'min_value':'constraints.min',
'max_value':'constraints.max',
'max_length':'maxLength',
#'max_digits':'maxDigits',
'decimal_places':'constraints.places',
'js_regex':'regExp',
'multiple':'multiple',
}

Original link: http://code.google.com/p/dojango/issues/detail?id=83