international-number-input
Reactive icon

International Number Input

version 0.1.1 (Compatible with OutSystems 11)
Uploaded
 on 14 October 2024
 by 
0.0
 (0 ratings)
international-number-input

International Number Input

Details
A JavaScript plugin for entering and validating international numbers. It adds a flag dropdown to any input, displays a relevant placeholder and provides formatting/validation methods.
Read more

International Number Input is a plugin, written in pure JavaScript, for handling international numbers. It makes it easy for your users to enter their number, and for you to validate it before saving it to your backend. Then, at a later time, you can display the number back to them in a format of your choice. All the while, giving you complete control with a variety of initialization options, public methods for interaction, and custom events you can listen for and react to.

By default, it adds a country dropdown to your input, and sets the placeholder to an example number for the selected country. Once the correct country is selected, the user is free to enter their number in whatever format they are used to. The plugin then provides comprehensive validation tools, including returning error codes for invalid numbers, which you can then map to you own custom error messages. Finally, it returns the full standardized international number for you to save to your backend.

The country dropdown can be navigated by typing a country's name, or using the up/down arrow keys. You can control which countries appear in the list, as well as if any "preferred countries" should be displayed separately at the top. You can also provide localized country names if you wish. Full accessibility is provided via ARIA tags. Finally, the flag images can be completely disabled if needed, and you can replace the selected flag with a dial code instead.

Release notes (0.1.1)

Fixed an issue with the OnlyCountries input parameter, that would give an error and block the input from initializing when that parameter was set.

License (0.1.1)
Reviews (0)
Team
Other assets in this category