381
Views
7
Comments
Validate character minus and plus
Question

Dear all please help,,

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

2025-10-09 15-40-22
Craig St Jean
Staff

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 -?

2019-03-03 13-55-42
Hothorasman Panjaitan

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 - +



2025-10-09 15-40-22
Craig St Jean
Staff

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?

UserImage.jpg
Hothorasman Panjaitan

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


2019-05-22 11-30-09
Marcelo Ferreira

Hi,

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

Regards,

Marcelo

2017-12-13 08-27-28
Joey Moree

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.

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

Hi Hothorasman,

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

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