A phone number input made with Vue JS (format & valid phone number)
MIT License
Bot releases are hidden (Show)
Published by LouisMazel over 4 years ago
Published by LouisMazel over 4 years ago
Ex: Init the component withv-model
= +33612345678
---> the component's country selector is set & the update event return
{
countryCode: "FR",
isValid: true,
phoneNumber: "612345678",
countryCallingCode: "33",
formattedNumber: "+33612345678",
nationalNumber: "612345678",
formatInternational: "+33 6 12 34 56 78",
formatNational: "06 12 34 56 78",
uri: "tel:+33612345678",
e164: "+33612345678"
}
Works when you entering the number and if the country code is null
libphonenumber-js
dependency to 1.7.51Published by LouisMazel over 4 years ago
Published by LouisMazel over 4 years ago
Published by LouisMazel over 4 years ago
Thanks @hitesh399
Published by LouisMazel almost 5 years ago
Published by LouisMazel almost 5 years ago
Published by LouisMazel almost 5 years ago
Published by LouisMazel almost 5 years ago
Published by LouisMazel almost 5 years ago
error-color="red"
#59#61 Release 1.0.8
Merci @antoine92190
Published by LouisMazel almost 5 years ago
Published by LouisMazel almost 5 years ago
show-code-on-list
optionPublished by LouisMazel almost 5 years ago
Published by LouisMazel almost 5 years ago
Published by LouisMazel almost 5 years ago
Published by LouisMazel almost 5 years ago
Published by LouisMazel almost 5 years ago
Bugs fix:
Feature:
no-country-selector
) to hide the country selector (you can use the component to only validate phone numbers) #46update
payload #44Compatibility:
Published by LouisMazel almost 5 years ago
Now with fetch-country
attribute (prop) you can fetch the country code via ip2c.org
The network is needed
Published by LouisMazel almost 5 years ago
Published by LouisMazel about 5 years ago