This demo is based off the Phone Number Verification without Regular Expression project. I extended it to use libphonenumber-js, which is based off Google's libpphonenumber. The canonicalized output is of the E126 standard.
-
Make sure you have Docker installed.
-
Clone repository, build and run the container
git clone https://github.com/senglin/phone-validation.git
cd phone-validation
docker build -t phonenumber-validation .
docker run -it --rm -p 3000:3000 phonenumber-validation
- Try out the following links on the browser which will result in
+12069876123
.
http://localhost:3000/check/2069876123
http://localhost:3000/check/12069876123
http://localhost:3000/check/+12069876123
http://localhost:3000/check/+1(206)987-6123
http://localhost:3000/check/+1(206)987-6123
http://localhost:3000/check/(206) 987-6123
Ctrl-C
to shut down the server.
- Seng Lin Shee [email protected]
MIT