#1151 closed enhancement (fixed)
dojo.regexp.currency needs to be more flexible with separators
Reported by: | guest | Owned by: | dylan |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | General | Version: | 0.3 |
Keywords: | regexp currency multiple separator | Cc: | |
Blocked By: | Blocking: |
Description
I was noticing that dojo.regexp.currency always expects one and only one separator, and if it gets more than one, it resets to just a comma. This does not work when both 1234 and 1,234 are valid values. An easy change would be on line 367 of regexp.js from:
if (typeof flags.separator != "string") { flags.separator = ","; }
to:
if (typeof flags.separator == "undefined") { flags.separator = ","; }
Strangely enough, this already occurs in dojo.regexp.integer (which is called by the dojo.regexp.currency.) This way, the method could be called with flags like this:
{separator: [",",""]}
...to accomplish the desired result.
Change History (3)
comment:1 Changed 14 years ago by
Milestone: | → 0.4 |
---|---|
Owner: | changed from anonymous to dylan |
Status: | new → assigned |
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
thanks for the tip, fixed in [4906]