1275
Views
4
Comments
Solved
Restricting input field to accept alaphabet or alphanumeric values
Question

Hi,

I am working on a timesheet application. I want to restrict the input field in the editable table to accept alpha-numeric input. I want to allow only decimal value input. How can I perform validation in this regard? Can  i use the regex in validation if condition and how? 


Kind regards

Hassan

2020-04-29 04-03-57
Maya Hartina Hutagalung
Solution

Hassan wrote:

Hi,

I am working on a timesheet application. I want to restrict the input field in the editable table to accept alpha-numeric input. I want to allow only decimal value input. How can I perform validation in this regard? Can  i use the regex in validation if condition and how? 


Kind regards

Hassan


Hi Hassan,

you can simply adjust the setting inside the Editable Table into something like this:

In this way, user cant type any other character except number and "." for decimal value.


Rgds,

Lady

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Hassan,

Have you checked the CustomMask Forge component? It was designed for just that purpose.

2023-02-10 19-42-59
João Melo
 
MVP

If you want to mask money fields, I'd suggest this component, the best jQery library for money mask:

https://www.outsystems.com/forge/component/3344/jquery-mask-money/


If you want more flexibility and restrict characters on input fields, give this one a try:

https://www.outsystems.com/forge/component/1002/restrictchars/


Both of them have Sample pages.

2020-04-29 04-03-57
Maya Hartina Hutagalung
Solution

Hassan wrote:

Hi,

I am working on a timesheet application. I want to restrict the input field in the editable table to accept alpha-numeric input. I want to allow only decimal value input. How can I perform validation in this regard? Can  i use the regex in validation if condition and how? 


Kind regards

Hassan


Hi Hassan,

you can simply adjust the setting inside the Editable Table into something like this:

In this way, user cant type any other character except number and "." for decimal value.


Rgds,

Lady

UserImage.jpg
Osama Hassan

hi everyone, thanks for the response. I have solved this issue. I had used the masks but they were not working according to my requirements. I just changed the input type of the input field to number from text. And that solved my issue.


cheers

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