Country based phone number validation
Question

Hi Guys,
I have a Country code in dropdown, I need to validate the PhoneNumber Based on Selected country code, Its possible, Any one achieve this?


Thanks,
Nave

Hi Jose,
This component we need to purchase the API key

Hi Nave,

Could you please try this Forge component, if you want to accept phone from different countries:

https://www.outsystems.com/forge/component-overview/4670/international-dial-code-input-with-country-flags 

Thanks & Kind Regards,

Sachin

Hi Nave,

Without purchasing or using an external tool the only way is to build the logic yourself.

I found a free tool (250 calls per month) you can use 'numverify API | Free Phone Number Validation & Lookup API '.

You can find the API documentation here 'Documentation | numverify API '.

Hope it helps,

Ricardo Pisco.

Hi Ricardo,
Without API we cannot achieve this?


Thanks,

Jeyasri

Hi,

You can but the full logic needs to be developed.

The best way without using an API is to create a lookup with the country codes you need to validate with:

  • Code (entity identifier)
  • Name
  • RegularExpression (used to validate the number)

Then create an action that receives the Code and mobile number and apply the regular expression to validate if the phone number is valid.

The biggest problem here is to fill the lookup with all the regular expressions.

Hope it helps,

Ricardo Pisco.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.