I have a question concerning a search fiel on my website. I want to let the user search for a city in germany. Currently i am using the 'odgbPLZnearby' i found online. This outputs other zip-codes within a given distance of the entered zip-code. Currently i use a to enter the zip-code.
Now i want to expand the feature so the user can also enter the name of the city or zip-code and city. I suppose i have to modify how the input is handled, but i do not know how.
How do i hanlde the different cases of:
- zip-code only
- city name only
- zip-code + city
- city + zip-code
- one of them is entered incorrenctly
- typos
- city + zip-code dont match
- added commas (e.g. "56068 Koblenz" / "56068, Koblenz")
- different versions of citynames (e.g.: "Lauf a. d. Pegnitz" / "Lauf an der Pegnitz")
I would really appreciate your help. Thanks