55
Views
4
Comments
[Input Mask Reactive] Bug with negative sign
input-mask-reactive
Reactive icon
Forge asset by Steven Decock
Application Type
Reactive

Hi,

if you put the (-) sign inside the number, the validation of max doesn't work :(

2018-10-29 08-31-03
João Marques
 
MVP

Hi Diogo,


You are using the InputNumberMask, and with a dash in between, the value is no longer a number, hence the error.

If you want to support dashes in between, perhaps you want to use the InputPatternMask and you use a Regex pattern to support the accepted paterns.


Kind Regards,
João

2023-11-10 11-46-42
Diogo Barbosa

Hi João,

I don't want to use dashes... I just want that the user can't use them :)

I'm using a number field, so that example that I gave is not a number, but it is being allowed by this asset.

Thanks ;)

2022-05-02 13-50-49
Paulo Ritto

Hi @Diogo Barbosa , you can use a regex pattern to dictate what characters are allowed,

for this you can use my component from Forge:
https://www.outsystems.com/forge/component-overview/12976/regexinput

Where you simply need to pass the RegexPattern and the Input Id, and the user will not be allowed to type characters that do not match with the regex pattern provided.


For more knowledge on regex patterns, you can search and experiment on regex101.com


Let me know if this helped!

Cheers,

Paulo

2023-11-10 11-46-42
Diogo Barbosa

Thanks Paulo,

That's great!

But I was just reporting this bug, for others don't get caught with something like this.

;)

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