Phone data type validation

Hi All ,

Simple question - When building a mobile app

 And I set a input data type to Phone

When I enter any letters in the input the valid property should be false correct ?

No matter what I type the valid property is coming back as true... it seems to be acting like a Text data type ?

I dont want to do custom validations if its not need. So why is the phone data type not working correctly ?


Thanks

Jacques  

Hi Jacques,

That is correct the input type tel (Phone) are functionally identical to standard text, the main advantage is the keyboard that is shown to the user that is different.

See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel for more information.

To validate phone numbers I suggest using a component like https://www.outsystems.com/forge/component-overview/10647/international-telephone-input-reactive

Regards,

Rúben

Hey Jacques de villiers, You can use regex for that. For example 

RegExp('^[0-9]+$')

Thanks

Ankit S

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