Hi All I need to implement an API for mobile number validation for different countries with different country codes.
Hi,
See if this post helps you.
Regards
I need to use API not forge component.
Most Forge components are just abstractions on top of an API, so not sure what your issue is with a Forge component.
Hi Akshata,
Do you mean a server side action and not a client side action? Are you doing some validation inside server actions and nothing related to UI?
And do you require this so you can expose the server actions as a REST API, or public actions for other modules to use? Am I overthinking? In your post description, you mentioned "I need to implement an API for mobile number", and then in a recent reply, you mentioned, I need to "use" API. Please suggest what is your use case?
Hi Ravi Yes I need to do some mobile validation for different countries could you pls assist me how it is done using REST API.
Try using a third-party library from forge components like CleaveJS or something similar.
You can create a Entity and with country name and country code and create logic with input parameter and validate information with entity after that you can return validation information.
Regards,
Sandeep Mallah
Hi All could anybody assist me on how to validate mobile number using REST API.
@Akshata Tallur its very difficult to help when the question is not proper and having missing information.
Kindly give some screenshots and the purpose you want to use "API". It can be done without API, it can be done using javascript, client actions, server actions, REST API, third party libraries etc.
It all depends on what's your scenario. Do you have a UI involved in your use case? If yes, then you can create your client or server actions, without any API. If there's no UI, then provide more details how this validation feature will be used.
Hi Akshata, is this Traditional Web or Reactive Web app?
Hi Ravi its in traditional.
Use this forge component in your app for validating phone number
https://www.outsystems.com/forge/component-overview/10636/worldwide-phone-number-validator
Hi Ravi,
I tried using the forge component but while entering the phone number and validating it. I am not getting a proper result. It gives me correct result only when I add the Phone Number using dialling code. My actual implementation should be I should enter only 10 digit mobile number and validate the number.