Coder Social home page Coder Social logo

juanjotorres90 / ngx-material-intl-tel-input Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 2.0 1.48 MB

Introducing an Angular library designed to streamline the input and validation of international telephone numbers.

Home Page: https://www.npmjs.com/package/ngx-material-intl-tel-input

License: MIT License

TypeScript 58.99% HTML 6.79% SCSS 8.88% JavaScript 0.09% CSS 25.24%
angular angular17 angular18 angularmaterial intl-tel-input material ngx phonenumber telephone validation

ngx-material-intl-tel-input's Introduction

Hi there ๐Ÿ‘‹

I'm Juanjo and I'm a Front-End Developer based in Barcelona, Spain.

ngx-material-intl-tel-input's People

Contributors

juanjotorres90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

whegar grondig

ngx-material-intl-tel-input's Issues

HI can we remove phone icon

HI can we remove phone icon
<ngx-material-intl-tel-input
[preferredCountries]="['in', 'us', 'nz']"
[enablePlaceholder]="true"
[enableSearch]="true"
cssClass="country-selector"
(countryChanged)="changeCountry($event)"
[fieldControl]="phoneControl"
[initialValue]="''"
[textLabels]="textLabels"
>

NgxMaterialIntlTelInputComponent

how to use formControlName so that we can get value of phone no

this.addOrgGroupForm = this.fb.group({
id: [0],
email: ['', [Validators.required]],
phone: new FormControl(''),
});

submitForm() {
  console.log(this.addOrgGroupForm.value);
 }
 <form class="register-form m-4" [formGroup]="addOrgGroupForm" (ngSubmit)="submitForm()">
  <div class="row"> 
          <div class="col-xl-6 col-lg-6 col-md-12 col-sm-12 mb-2">
            <mat-form-field class="example-full-width mb-3" appearance="outline">
              <mat-label> Name</mat-label>
              <input matInput formControlName="name" required>
              @if (addOrgGroupForm.get('name')?.hasError('required')|| addOrgGroupForm.get('name')?.touched) {
                <mat-error >
                  {{displayErrMessage.required}}
                </mat-error>
                }
            </mat-form-field>
          </div>
          <div class="col-xl-6 col-lg-6 col-md-12 col-sm-12 mb-2">
           <ngx-material-intl-tel-input   > </ngx-material-intl-tel-input>
                  </div>
  </div>
 </form>

ng-valid when form control is invalid

Using angular 18 and the latest version of this library, it happens that the formControl associated to the ngx-material-intl-tel-input component is invalid, but the ng-valid class is shown.

Captura de pantalla 2024-07-25 a las 14 41 03
Captura de pantalla 2024-07-25 a las 14 41 08
Captura de pantalla 2024-07-25 a las 14 42 47

Component ID generation collision

I get the following warning message, while retaining full functionality of the component:

NG0912: Component ID generation collision detected. Components '_MatFormField' and '_MatFormField2' with selector 'mat-form-field' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID. Find more at https://angular.dev/errors/NG0912

Environment:
Angular CLI: 18.0.4
Node: 20.14.0
Package Manager: npm 10.7.0
OS: darwin x64
@angular-devkit/architect 0.1800.4
@angular-devkit/build-angular 18.0.4
@angular-devkit/core 18.0.4
@angular-devkit/schematics 18.0.4
@angular/cdk 17.3.10
@angular/cli 18.0.4
@angular/fire 18.0.1
@angular/material 17.3.10
@angular/ssr 18.0.4
@schematics/angular 18.0.4
rxjs 7.8.1
typescript 5.4.5
zone.js 0.14.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.