AnsweredAssumed Answered

constraining input with regex not working with .0

Question asked by monzay on Apr 2, 2019
Latest reply on Apr 3, 2019 by monzay

I want to constrain the input of a number that is 1-7 numbers, a decimal point, and one number after the decimal point. If the number after the decimal point is zero it doesn't validate.

 

I've tried 

regex(.,'^\d{1,7}\.\d{1}$')

regex(.,'^[0-9]{1,7}\.[0-9]{1}$')

 

123.0 - invalid

1234567.9 - valid

1.0 - invalid 

1.1 - valid 

Outcomes