Validate character minus and plus

Validate character minus and plus

  

Dear all please help,,

I specify the type of integer text, but how to avoid character - +

Hello Hothorasman Panjaitan,

I'm not sure I follow, are you asking about using an Integer data type, or Text data type?  What about the + and -?

Craig St. Jean wrote:

Hello Hothorasman Panjaitan,

I'm not sure I follow, are you asking about using an Integer data type, or Text data type?  What about the + and -?

I have a variable integer, but how to avoid input - +



Where are you trying to put the + and -?  Are you saying you are trying to enter a + or - in a form input and submit it to the server?  Or do you mean you want to display it but with the - stripped out if it is negative?

Hi,

You have components like this that can help you RestrictedChars or CustomMasks

Regards,

Marcelo

For HTML input elements you can use the pattern attribute (regex patterns to restrict characters or force a certain pattern to be used for instance for phone numbers).

https://www.w3schools.com/tags/att_input_pattern.asp

This way you don't have to use an extra component to get this working.

Craig St. Jean wrote:

Where are you trying to put the + and -?  Are you saying you are trying to enter a + or - in a form input and submit it to the server?  Or do you mean you want to display it but with the - stripped out if it is negative?

Disable character -+ with keydown


Hi Hothorasman,

Did you check the links Marcelo provided? Those components can restrict the characters you input in an Input Box.