[InputMask React] Mask is not working when navigate from another page
Reactive icon
Forge component by João Barata


I have a problem with number mask. The number mask is return zero value in some situations. I have make sometest, and, when I navigate from some page to a page that has an input with this mask number, something seems not load well, and mask is returning "zero". If I open the page directly (first page that I load), or reload page, works fine the mask.

It's saying "required filed" because returns zero.

Is some solution on the way for this bug?


hello  carlos, 

there is chances to solved your bug with the customize value used if condition and push that zero in validate condition if you want

because as number zero consider no value due to this you are getting invalidate while navigating. you need to build customize validation on the navigation button and valid that form for zero .

Thanks and Regards,

Akshay Deshpande

Hi Akshay ,

I'm not sure if I have understood you correctly. I think you are suggesting that I should disable the "build-in validations" and do a validation myself.

The problem with the mask is not only form validation, but also the internal working. The mask returns value = 0 in OnChange, even I build a custom validation to avoid form validation, I do not have the value that user has typed, so I can not make a custom validation.

The strange thing here is, if I recharge the page, or open the page directly, mask works, but If I navigate from another page to the page that has de mask, don't works. I hope the creators of the mask can give us a solution, there are many problems in general with the masks, most of them do not work well; I was actually asking here if anyone knows of one that works fine: https://www.outsystems.com/forums/discussion/74323/is-any-react-mask-for-decimals-that-works-with-for-decimals-and-for-group/

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