20
Views
6
Comments
input mask not allowing a 0 first
Question

I am using this component.
I have a CVV number that is text (max. 3) on the DB, I use this input mask so that the user can only input numbers.
But now, i cant enter a cvv of 038 or any cvv starting with a 0.
How can i fix this without changing the data type of the CVV on the DB.

Rank: #109

Hi Divan,

You may use the regular expression on the input field to restrict it to start from 0.

^[1-9][0-9]*$

Regards,

Swatantra

Divan van Kruiselbergen wrote:

I am using this component.
I have a CVV number that is text (max. 3) on the DB, I use this input mask so that the user can only input numbers.
But now, i cant enter a cvv of 038 or any cvv starting with a 0.
How can i fix this without changing the data type of the CVV on the DB.


Haven't tried this component. I generally use this one and it works fine for such masks. https://www.outsystems.com/forge/component-overview/647/custom-input-masks

Rank: #109

For component specific question, it's advised to start the discussion on the support tab of the (Input Masks Library) component.