This content originally appeared on DEV Community and was authored by Caroline Mwasigala
Let's get real, it sucks when things don't behave the way they should. User-friendliness is underrated when it comes to form input fields.
When providing a user with an input field to write a number and it doesn't get formatted as how normally numbers are, it gives the user another task of counting zero's, honestly it sucks ?.
Tried searching for a solution online but couldn't find what I wanted ?, that's when I decided to solve it myself and help others by compiling the solution into a library and place it in a place where anyone can find it.
Demo
How did I do it ?!
Regular Expression
Why reinvent the wheel?! ?
Regards,
This content originally appeared on DEV Community and was authored by Caroline Mwasigala
Caroline Mwasigala | Sciencx (2021-09-26T17:57:11+00:00) Counting zero’s sucks!!. Retrieved from https://www.scien.cx/2021/09/26/counting-zeros-sucks/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.