vue-tel-input
vue-tel-input copied to clipboard
Bug with Russian number
When number is 8 (964) 534-35-44 and i delete last symbol it becomes 8 (896) 453-43-54 One more 8 added, and it's really strange
same issue
same issue +1
+1
+1`
It because of replaced awesome-phonenumber lib to libphonenumber-js So i used some workaround
valueMutator: ({ ref, inputVal }) => {
if (!ref.phoneObject.valid) {
return
}
const result = new PhoneNumber(inputVal, ref.phoneObject.countryCode)
if (!result.isValid()) {
data.value.user.phone.local = inputVal
return
}
data.value.user.phone.international = result.getNumber('international')
return result.getNumber('national')
}