Aug 22, 2017 · 1 min read
I was also having similar issue, in my case it was a phone number input: https://codepen.io/zenyr/pen/zzeNQW
In Korea we have 2–3 segments each having 2, 3 or 4 digits. I also wanted to update it real-time. At first it seemed like a simple regex could solve this but after a few trials I had to run a few loops to cover real world use cases.
After reading your article and I replaced type=”text” to type=”tel”. It looks much better on mobile now!
