524
Views
4
Comments
Phone Number validation
Question

Hi,

I am creating a sample reactive web application. i found that while filling customer details in form Phone number field accepting Alpha characters also even i opted data input type  is Phone in UI sceen and entity attribute as well. 

can you please suggest me by default outsystems phone number will accept alpha & numeric characters? if yes, what is the way to validate from UI screen.



2025-12-12 06-45-53
Nandhakumar Sureshbabu

Hi @kishore reddy ,

The phone number datatype will validate the field, but the outsystems default length will be 20. If you want to customize the length you can use the regex expression.

Hope this helps.

Regards,

Nandhakumar S. 

UserImage.jpg
kishore reddy

Hi NandaKumar,

Thanks for the reply. i was looking at the input type validation it means it's taking text also while entering phone_input field. so i understood that input Type Phone is also taking text and number while filling data from UI



2023-10-21 19-42-11
Tousif Khan
Champion

Hello

If you only want numeric characters to be enter in a input widget, you can do it with multiple ways.

  • You can create a regular expression.
  • You can disable the keys using ascii codes.
  • You can use  various forge available for this.

What I personally observed, 

When using numeric data type you are allowed to enter alpha characters as well. But when you use the application on your mobile phone or Ipads, where you have virtual keyboards. so at that time it will show you numeric keypad.

So to completely avoid special characters, spaces or alpha characters and only allow you can achive it with any of the aproach which is above.

I am also attaching a sample for you, that I have used to allow only numeric value.

To use this way you need to add a Javascript lib to your Script Folder

https://personal-ejuytnht.outsystemscloud.com/SA/Allowonlynumeric

I hope this will help you.

Best Regards
Tousif Khan

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