Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • It is important that the input type for this question be text, not number, integer, or decimal; therefore you should use the question type "Text" or "Numeric ID/Phone Number" (this question type is technically text with a numeric keyboard appearance). Numbers are represented and compared by their numeric value, so "65.00" and "65" are equivalent. 

  • These validation example often don't validate the actual size of the number at all. You can similarly restrict the values before the decimal sign in your expression using regular expressions, but remember that if it is difficult to express whether a value is valid, users may have a hard time entering the correct value.

  • It is possible to restrict the input range in a language that uses different Unicode characters, to do that you would input the range of Unicode characters for that language in the regex expression
    Image Removed
    Image Added

Examples

 

Example 1: Require a specific number of significant figures

Icon

To require an input with an arbitrary size, but always with two significant figures, you can use the following:

Valid Inputs: 34.00, 4.32, 0.23

Invalid Inputs: 34, 0.0, 2.3, 34.2222

 

Enter into Validation Condition = regex(., '^[0-9]*\.[0-9][0-9]$' )


the two [0-9] elements at the end are the placeholders for the significant figure digits. You can add or remove more to manipulate the number of digits

...