Opened 16 years ago

Closed 16 years ago

Last modified 12 years ago

#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:


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 = ","; }


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: [",",""]} accomplish the desired result.

Change History (3)

comment:1 Changed 16 years ago by dylan

Milestone: 0.4
Owner: changed from anonymous to dylan
Status: newassigned

comment:2 Changed 16 years ago by dylan

Resolution: fixed
Status: assignedclosed

thanks for the tip, fixed in [4906]

comment:3 Changed 15 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.