Opened 12 years ago
Closed 12 years ago
#10720 closed defect (wontfix)
Currency/Number Text boxes does not validate when not all decimal places entered
Reported by: | snimavat | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit | Version: | 1.4.0 |
Keywords: | Cc: | Douglas Hays | |
Blocked By: | Blocking: |
Description
Since Dojo 1.4 if CurrencyextBox? has places:6 specified and user does not enter all six decimal places, it will show error instead of adding trailing zeros.
<input type="text" dojoType="dijit.form.CurrencyTextBox" required="true" constraints="{fractional:true, places:6}" currency="USD">
Attachments (1)
Change History (3)
Changed 12 years ago by
Attachment: | currency.html added |
---|
comment:1 Changed 12 years ago by
Cc: | Douglas Hays added |
---|---|
severity: | blocker → major |
comment:2 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The fix in #10669 will enable you to specify something like places:'0,6' and enter anywhere from zero to six decimal places, but the widget currently will not let you enter anything less than the specified amount of places and expect padding.
Note: See
TracTickets for help on using
tickets.
I believe this is how places is supposed to work, where places defines a fixed number of decimal places, no more and no less. I think the behavior you're depending on was not intentional. In Dojo 1.3
so perhaps something changed in the Dijit logic. Doug, does this sound familiar?
It's not official API, but you might try places:'0,6' I think specifying a range might be the proper way to get this behavior. We should probably look at getting that syntax tested and documented.