Comments (3)
This seems like an issue with your masking library, not this library! This library doesn't prevent you from typing plus or anything else!
from intl-tel-input.
Thank you for the response. We are not utilizing an external masking library. For masking, we are using the following code:
HTML Code:
<input class="input-phone-field" type="text" minlength="5" (keyup)="onPhoneChange($event)" id="cellphone_1" maxlength="15" formControlName="phone" name="phone" />
TypeScript Code:
var newPlaceholder = (window as any).intlTelInputUtils.getExampleNumber(
selectedCountryData.iso2,
true,
(window as any).intlTelInputUtils.numberFormat.INTERNATIONAL
);
(<any>iti).getSelectedCountryData();
// Reset the phone number input.
(<any>iti).setNumber((<any>iti).getNumber());
// Convert the placeholder as an exploitable mask by replacing all 1-9 numbers with 0s
var mask = newPlaceholder.replace(/[1-9]/g, "0");
// Apply the new mask for the input
$(phoneInputID).mask(mask);
Please suggest a code fix based on this information.
from intl-tel-input.
Well as I said, this library doesn't prohibit you from typing plus or anything else, as you can see from the demo page. So it must be your custom code that is doing this. If you comment out all of your masking code, does that fix the issue?
We are not utilizing an external masking library
You appear to be using the jQuery mask plugin, no?
$(phoneInputID).mask(mask);
from intl-tel-input.
Related Issues (20)
- When countrySearch: false, and you search for a country it does not scroll to it HOT 5
- Country Dropdown Hidden Mobile HOT 4
- Search country input on mobile browsers is not tapable HOT 6
- React version of intl-tel-input throws an error when unmounted HOT 2
- Format as you type nor working HOT 1
- There should be no 0 after the code in Türkiye number HOT 5
- Bug: `nationalMode` and `showSelectedDialCode` together HOT 6
- Initialization options: "i18n.countryListAriaLabel" has no effect HOT 2
- Search field not appearing within drop down HOT 4
- Uncaught Error: No country data for 'undefined HOT 23
- Send Country data to Hubspot HOT 1
- Not the correct mask for the country France HOT 2
- Showing invalid number even if the number is valid HOT 9
- initialCountry does not work if you send the country code in the upper register HOT 3
- Issue with setNumber() HOT 2
- Please make esbuild a devDependency again HOT 2
- Validation of empty phone field (mandatory phone input * ) HOT 1
- isValidNumber() passing on invalid number HOT 14
- Accessibility: Dropdown not reading country options HOT 3
- Valid Turkey number starting with some prefixes etc.0561 returns invalid number HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intl-tel-input.