Formatter reset or re-instantiate request #10

Closed
edudar opened this Issue Nov 1, 2013 · 2 comments

Projects

None yet

3 participants

edudar commented Nov 1, 2013

There's a special code in jQuery wrapper that prevents multiple instances of Formatter to be created which is good. The issue come when you seriously need to change pattern on the go. Typical example is credit cards one. Master Card, Visa and Discover all good with 4 groups of 4 digits. 16 total. American Express instead has 3 groups with 4, 6 and 5 digits. 15 total. Which card user types in you can get by first digit - it's 3 for Amex. Of course you can delay instantiation until user types first digit but what if he changes his mind later?

Owner

Adding a reset pattern method should not be terribly difficult. I will look into implementing this in the next release. Thanks you for your input.

Can you give me a jsfiddle demo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment