Hello everyone,
Im developing reactive app ,
im using input field with phone number and assigning attribute with datatype phone number,
its allowing alphabets also i should restrict user to enter alphabet ,.only digits should enter.
How to achieve this..
can some one pls help me here..
Regards.
Hi @salman Syed ,
I am attaching the OML for your reference.
Click here to check the Demo
I hope it will be Helpful.
Regards,
Krishnanand Pathak
This solution works but you can see the letters if you click on letters and after disappears. Better to have a JS that not allow you to enter any letter.
Hi Salman,
Here is everything what you are expecting,
I have provide answer with oml file here, you can refer it.
https://www.outsystems.com/forums/discussion/75877/phone-no-regex/
https://www.outsystems.com/forums/discussion/75255/phone-number-validation/
If you want to restrict alphabets then you can use this one,
Thanks,
Ajit Kurane.
Hi @salman Syed
You can always change the input and variable to number and validate on save.
Cheers
Generally phone number contains some special characters like +121, +91.
If you are not concerned with country code set the datatype to integer and limit the number of digits.
If you want country code just simply make 2 containers, 1st add dropdown for country code with country name representing it. 2nd add input parameter with datatype integer. (Corresponding changes will be required in the Entity attributes)