I've tried to use this lib, but faced some weird (as for me) behavior. I have string with wrong telephone number +38093sdaf342, 380 is a code of Ukraine, but any non-digit characters is not allowed in Ukrainian numbers. Here is the function where I try to validate this number.
public bool IsValidPhoneNumber(string number,string regionCode)
{
var utils = PhoneNumberUtil.GetInstance();
var phoneNumberInstance = utils.Parse(number,regionCode);
return utils.IsValidNumber(phoneNumberInstance);
}
Passed params to function number=+38093sdaf342, regionCode="UA".
Ive seen that in created byParsefunction object propertyNationalNumber` is set to 937323342. Why is it so? I thought that this number must be validated as invalid cause it contains not only digits. Is it a bug or an expected behavior?
I've tried to use this lib, but faced some weird (as for me) behavior. I have string with wrong telephone number
+38093sdaf342, 380 is a code of Ukraine, but any non-digit characters is not allowed in Ukrainian numbers. Here is the function where I try to validate this number.Passed params to function
number=+38093sdaf342,regionCode="UA".I
ve seen that in created byParsefunction object propertyNationalNumber` is set to 937323342. Why is it so? I thought that this number must be validated as invalid cause it contains not only digits. Is it a bug or an expected behavior?