
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
ember-intl-tel-input2
Advanced tools
An Ember.js addon for entering and validating international telephone numbers.
An Ember.js addon for entering and validating international telephone numbers. This project is a fork of justin-lau/ember-intl-tel-input that is outdated.
Please check out the demo page to see the addon in action.
For more information on using ember-cli, visit http://www.ember-cli.com/.
$ ember install ember-intl-tel-input2
Just place the {{intl-tel-input}}
component in the handlebars template, as you would have guessed.
{{intl-tel-input}}
The component derives from Ember.TextField
, anything you can do with the input helper can also be done with this component.
{{intl-tel-input value="555-5555"}}
With the utilities script included, the autoPlaceholder
option is automatically enabled.
// ember-cli-build.js
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
...
'ember-intl-tel-input': {
includeUtilsScript: true, // default to false
},
...
});
...
};
Or if you want to specify your own compatible utils script (like a custom build).
// ember-cli-build.js
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
...
'ember-intl-tel-input': {
utilsScript: 'path/to/utilsScript.js',
},
...
});
...
};
If you use both options the default utilsScript will be exported to the path specified.
{{intl-tel-input}}
Use the following properties for binding:
value
for input valueselectedCountryData
for data of the currently selected countrynumber
for formatted phone numberextension
for the extension part of the numbernumberType
for the type of the current numberisValidNumber
for the validity of the numbervalidationError
for information about a validation error{{intl-tel-input
allowExtensions=true
value=value
selectedCountryData=selectedCountryData
number=number
extension=extension
numberType=numberType
isValidNumber=isValidNumber
validationError=validationError}}
intl-tel-input
provides a convenient way to look up the user's country based on their IP addresses. This example uses ipinfo.io for demonstration.
// controller
...
geoIpLookupFunc: function(callback) {
$.getJSON('http://ipinfo.io/')
.always(function(resp) {
if (!resp || !resp.country_code) {
callback('');
}
callback(resp.country_code);
});
}
...
{{intl-tel-input
initialCountry="auto"
geoIpLookup=geoIpLookupFunc}}
Run ember server
, and visit the demo page at http://localhost:4200
.
This is a wrapper library. It simply wraps the API of the original jQuery plugin created by Jack O'Connor into an Ember.js component.
The original jQuery plugin also depends on several other open-source libraries:
This addon's demo page uses Telize for a fast, SSL-supported, yet FREE Geo IP service.
Telize no longer provide free services due to heavy abuse. The demo has switched over to ipinfo.io.
The layout and color theme of the demo page comes from Twitter's Bootstrap and Ember.js, respectively.
FAQs
An Ember.js addon for entering and validating international telephone numbers.
We found that ember-intl-tel-input2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.