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.
Hi @kishore reddy Please check the below threadshttps://www.outsystems.com/forums/discussion/75255/phone-number-validation/#https://www.outsystems.com/forums/discussion/77231/phone-data-type-validation/#RegardsKrishnanand Pathak
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.
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
Hello
If you only want numeric characters to be enter in a input widget, you can do it with multiple ways.
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 RegardsTousif Khan