diff --git a/package.json b/package.json index fcdf516c2..091b61b5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ngx-mat-input-tel", - "version": "18.4.0", + "version": "18.5.0", "scripts": { "ng": "ng", "start": "ng serve", diff --git a/projects/ngx-mat-input-tel/package.json b/projects/ngx-mat-input-tel/package.json index 3c152a73e..1ae2feaa4 100644 --- a/projects/ngx-mat-input-tel/package.json +++ b/projects/ngx-mat-input-tel/package.json @@ -1,6 +1,6 @@ { "name": "ngx-mat-input-tel", - "version": "18.4.0", + "version": "18.5.0", "author": { "name": "Raphaƫl Balet", "email": "raphael.balet@outlook.com" diff --git a/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.component.ts b/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.component.ts index 0bb32e464..9e227751e 100644 --- a/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.component.ts +++ b/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.component.ts @@ -49,7 +49,7 @@ import { Subject } from 'rxjs' import { CountryCode, Examples } from './data/country-code' import { Country } from './model/country.model' import { PhoneNumberFormat } from './model/phone-number-format.model' -import { phoneNumberValidator } from './ngx-mat-input-tel.validator' +import { ngxMatInputTelValidator } from './ngx-mat-input-tel.validator' import { SearchPipe } from './search.pipe' class ngxMatInputTelBase { @@ -75,7 +75,7 @@ const _ngxMatInputTelMixinBase: typeof ngxMatInputTelBase = mixinErrorState( { provide: MatFormFieldControl, useExisting: NgxMatInputTelComponent }, { provide: NG_VALIDATORS, - useValue: phoneNumberValidator, + useValue: ngxMatInputTelValidator, multi: true, }, ], diff --git a/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.validator.ts b/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.validator.ts index bc96a7c07..01da4338d 100644 --- a/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.validator.ts +++ b/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.validator.ts @@ -1,7 +1,7 @@ import { FormControl } from '@angular/forms' import { parsePhoneNumber, PhoneNumber } from 'libphonenumber-js' -export const phoneNumberValidator = (control: FormControl) => { +export const ngxMatInputTelValidator = (control: FormControl) => { const error = { validatePhoneNumber: true } let numberInstance: PhoneNumber diff --git a/projects/ngx-mat-input-tel/src/public-api.ts b/projects/ngx-mat-input-tel/src/public-api.ts index 710aca4ad..7fc02f0eb 100644 --- a/projects/ngx-mat-input-tel/src/public-api.ts +++ b/projects/ngx-mat-input-tel/src/public-api.ts @@ -3,3 +3,4 @@ */ export * from './lib/ngx-mat-input-tel.component' +export * from './lib/ngx-mat-input-tel.validator'