21
Views
5
Comments
Validating data in text widget
Question

Hey,

I have a text box that I would like to validate if the user has input data with number i.e.

Valid - John

Invalid - John3

The validation is not automatically identifying that the data is alphanumeric. Is there a built in function that can check if text has number or special characters?


Thanks in advance

mvp_badge
MVP
Rank: #128

Hi,


OutSystems button click have a validation method,

Client & Server will check the data type & data of controls - so if you have text field with text data type and if you entered number then it will prompt error.


You can try something like this to not let the user type in anything other than required data:  https://www.outsystems.com/forge/component-overview/647/custom-input-masks 


Demo here : https://mferreira.outsystemscloud.com/CustomInputMasksSample/Examples.aspx?(Not.Licensed.For.Production)= 


Is this what you are after ? 


Cheers,

Tushar

mvp_badge
MVP
Rank: #128
Rank: #89

Hi Otis Brown ,

also you can restrict user to put digits in inputs.

use regex_search like 

^[a-zA-Z ]*$

it will check only text string.


Regards

Rahul Sahu

Hi,

you can use one of several input mask that you can find on Forge or you can do a Regex Action, you have some funtions that able to do this.

I can share more information, but I will need know what kind of app you're building (Web, Mobile, React)

Cheers