A Vue3 Phone Number Input Component with validation check
npm install vue3-phone-number-inputInternational Phone Number Input with Country Code.
- With npm
``sh`
npm install vue3-phone-number-input
- With yarn
`sh`
yarn add vue3-phone-number-input
- Add the plugin into your app:
`javascript
import { createApp } from 'vue'
import App from './App.vue'
import Vu3PhoneNumberInput from 'vue3-phone-number-input'
import 'vue3-phone-number-input/dist/vue3-phone-number-input.css';
const app = createApp(App)
.mount('#app')
app.use(Vu3PhoneNumberInput)
`
`javascript`
app.use(Vu3PhoneNumberInput, {
placeholder: '11 111 11 11',
countryPlaceholder: 'Search',
countryLebel: 'Select Country',
})
- Use the PhoneNumberWithCountryCode component:
`html
v-model:country_code="form.country_code"
/>
`
`javascript`
`html``
v-model:country_code="form.country_code"
placeholder="11 111 11 11"
country-placeholder="Search"
country-lebel="Select Country"
/>