Gathering detailed insights and metrics for ngx-phone-number
Gathering detailed insights and metrics for ngx-phone-number
Gathering detailed insights and metrics for ngx-phone-number
Gathering detailed insights and metrics for ngx-phone-number
ngx-international-phone-number
angular-phone-number
A comprehensive international phone number input component for Angular applications with country selection, validation, and formatting.
ngx-intl-phone-number
International phone number validation for Angular using directive.
angular-phone-number-input
``` npm i angular-phone-number-input ``` Have implemented country-specific validations using [libphonenumber-js](https://www.npmjs.com/package/libphonenumber-js)
A simple international telephone number input for Angular
npm install ngx-phone-number
Typescript
Module System
Node Version
NPM Version
TypeScript (76.68%)
JavaScript (18.73%)
HTML (2.57%)
CSS (2.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
32 Commits
1 Forks
1 Branches
1 Contributors
Updated on Jan 08, 2023
Latest Version
1.0.3
Package Id
ngx-phone-number@1.0.3
Unpacked Size
183.01 kB
Size
28.18 kB
File Count
13
NPM Version
6.7.0
Node Version
11.12.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
4
A simple international telephone number input. Allows you to create a phone number field with country dropdown.
This is a fork of ngx-international-phone-number, asjusted to use smaller libphonenumber-js instead of Google's lib.
To install this library, run:
1$ npm install ngx-phone-number --save
Once you have installed it you can import PhoneNumberModule
from ngx-phone-number
in any application module. E.g.
1import { BrowserModule } from '@angular/platform-browser'; 2import { NgModule } from '@angular/core'; 3 4import { AppComponent } from './app.component'; 5 6// Import your library 7import { PhoneNumberModule } from 'ngx-phone-number'; 8 9@NgModule({ 10 declarations: [ 11 AppComponent 12 ], 13 imports: [ 14 BrowserModule, 15 16 // InternationalPhoneNumberModule module 17 PhoneNumberModule 18 ], 19 providers: [], 20 bootstrap: [AppComponent] 21}) 22export class AppModule { }
Once it is imported, you can use international-phone-number
:
1<!-- app.component.html --> 2<form name="sample-form" (ngSubmit)="submit()" #f="ngForm"> 3 <international-phone-number [(ngModel)]="model.phone_number" placeholder="Enter phone number" [maxlength]="20" [defaultCountry]="'in'" [required]="true" #phoneNumber="ngModel" name="phone_number" [allowedCountries]="['in', 'ca', 'us']"></international-phone-number> 4 5 <div *ngIf="f.submitted && !phoneNumber.valid" class="help-block">Phone number is required and should be valid</div> 6 <button type="submit">Submit</button> 7</form>
defaultCountryCode : An ISO 639-1 country code can be provided to set default country selected.
placeholder: A placeholder text which would be displayed in input widget
required: Indicates whether it's required or not
allowDropdown: Indicates whether to allow selecting country from dropdown
allowedCountries: A list of countries (iso codes) that would get display in country dropdown. E.g. [allowedCountries]="['in', 'ca', 'us']" would only show Canada, India and US. If not provided, all the countries would get displayed.
* Original Author: nikhiln
* Author: diokhan
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
134 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More