Restricting input field to accept alaphabet or alphanumeric values

Restricting input field to accept alaphabet or alphanumeric values

  

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,

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

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.

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

Solution

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