193
Views
8
Comments
[Simple Currency Input] How to prevent user typing minus(-) on the currency input field
Question
currencyinput-jpg
Web icon
Forge asset by César Santos

The control currently allows multiple minus symbols to be typed. How do we prevent it? 

2024-06-19 07-19-32
JitendraYadav

Please implement blur event and put restriction on '-'

2024-02-27 12-57-22
Sam Rijkers

Hi Babu,

I haven't used the component that you used. Using the Custom Masks forge component you can easily accomplish this by filling the Advanced Options with "{allowMinus: false}" (see image below). You can find more information about additional options in this link.

Regards,

Sam

2025-02-04 11-46-43
Waseema Shaikh
Staff

Hello Babu,

You can try this component available on forge.

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


Regards,

Waseema.

2025-10-27 16-39-03
César Santos

Hi Babu Basha, JITENDRA SINGH YADAV,

I will try implement that, but meanwhile take in consideration the feedback gaved from Waseema regarding the restriction on '-'.

Thank all, for the feedback.

Regards,

César

2024-06-19 07-19-32
JitendraYadav

Thanks Cesar...Waseema restrict character function use the same logic.it allow specific key code to work w.r.t to control using javascript.

2025-10-27 16-39-03
César Santos

JITENDRA SINGH YADAV wrote:

Thanks Cesar...Waseema restrict character function use the same logic.it allow specific key code to work w.r.t to control using javascript.

Jitendra,

Meanwhile you can already use the onblur event, just go to the extended properties of your textbox and do something like this:


2024-06-19 07-19-32
JitendraYadav

Cesar..already implemented at my end ..thats why i am suggesting to use on blur event. 

2025-10-27 16-39-03
César Santos

JITENDRA SINGH YADAV wrote:

Cesar..already implemented at my end ..thats why i am suggesting to use on blur event. 

Great :), I had not interpreted like that.

Take a look in the last version 1.2.6.4 for the restriction and improvement on '-'.

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