Require 2 Decimal Places in Text Response | XM Community
Skip to main content

I am working on a survey where individuals must enter monetary values. I would like to require all responses to have two decimal places (even if it needs to be .00) to prompt all respondents to enter the “cents”.

I see the option to have a “maximum” number of decimal places, but I don’t see an option for minimum number. Is there a way to require two decimal places? (As a note, the values can range from XXXX.XX all the way up to XXXXXXX.XX).

Thank you for your help!

You can’t require minimum decimals, only maximum decimals.


@kgc_unc 

Instead of using normal validation use custom validation for entry to match regex to below value and give an error or instructions to have 2 decimal places.

^\d+\.\d{2}$

Hope it helps!


@Deepak that worked! Thank you so much!


Leave a Reply