Skip to content
This repository was archived by the owner on Dec 11, 2017. It is now read-only.

remapping input characters#215

Closed
abathur wants to merge 2 commits intodigitalBush:masterfrom
abathur:master
Closed

remapping input characters#215
abathur wants to merge 2 commits intodigitalBush:masterfrom
abathur:master

Conversation

@abathur
Copy link

@abathur abathur commented Apr 4, 2014

Was using maskedinput for restricted-alphabet keys and ran into a situation where we needed to re-map some erroneous entries (i.e., 'o' -> '0') instead of simply blocking the disallowed character. This pull implements a reMap setting. The above transform would be accomplished like:
$("input.key").mask("xxxx-xxxx-xxxx",{placeholder:"x", reMap:{'o': '0'}});

Presumptive, but thought it might be a feature worth sending up. Did my best to include a relevant test.

Cheers

@digitalBush
Copy link
Owner

This looks similar to #166. I'm not a fan of the hash object defining the mapping though. I think if we implement this, we'll allow the user to provide a callback. Thank you for the PR though!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants