Dear community,
I am trying to restrict up to 2 digits (numbers from 0 to 99) my regex function in combination with decimal as type of question.
Thanks to your articles, I come up with the following:
regex(.,‘^([0-9]{1,2})+( \ .[0-9]{1,3})?$’)
The part about the decimal works perfectly, however restriction on the numbers before decimals does not work.
What do I miss?
Thanks!
Lavinia
Why not use a simple numeric constraint? type decimal with constraint . > 0 and . < 100.
If you also need to limit the decimal digits, you might use calculation with round() fucntion.