Hacker News new | ask | show | jobs
by derekp7 2460 days ago
Do you have a list of issues with various masking techniques, and / or sample input actions? For example, something wanting a North American telephone number in the format (999) 999-9999 often has issues if the user tries to enter parentheses or dashes. A proper solution is to allow the user to enter punctuation, and accept it if it is expected there, and to remember it for backspace purposes (so a backspace will either stop at, or skip over a "-" depending on if the user entered it).

It would be a fun programming exercise to take a long list of inputs and write some javascript that properly handles every one of them (or to point out where there are mutually exclusive requirements).