Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make auto-correction of postcodes optional #9

Open
jebw opened this issue Nov 11, 2020 · 2 comments
Open

Make auto-correction of postcodes optional #9

jebw opened this issue Nov 11, 2020 · 2 comments

Comments

@jebw
Copy link

jebw commented Nov 11, 2020

Currently with the autocorrect feature (I -> 1), if the user mistypes a post code, it will potentially be recognised as an entirely different postcode, eg

  1. User intends to type TE57 9NG
  2. They mistype, and enter TE57 ING - with I being below 9 on a qwerty keyboard
  3. UKPostcode parses this as TE57 1NG

This means if its being used to validate the postcode, it will be accepted but as a different postcode than the one the user intended.

If UKPostcode is being used to normalise the postcode, than it will normalise the mistyped postcode to TE57 1NG - if the rest of the form is valid than the user will never realise that a different postcode to the one they were trying to enter (TE57 9NG) has been accepted by the system.

Can this auto-correct feature be made configurable so the developer can turn if off if if required?

@svobom57
Copy link

+1 for this.

@threedaymonk
Copy link
Owner

I have no plan to implement it, but I'd accept a patch, if it's not too obtrusive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants