0

I need to add "Version" to my form but the Number type is giving me trouble. I need to RESTRICT entry to AT LEAST 3 characters (as in 2.0) but no more than 5 characters (99.99). How do I do this?

1
  1. Go to Text Box Properties - > Data Validation -> Add
  2. Choose ‘does not match pattern’ condition
  3. Choose custom pattern and enter this pattern \d{1,2}\.\d{1,2} enter image description here
  4. Enter ScreenTip and Message enter image description here
  • 2
    I like that approach better than mine. Note to self: Learn about regular expressions. – teylyn Dec 9 '13 at 0:58
0

You can set a validation rule on the "Version" field with these three conditions, combined with OR, using expressions

not(string-length(substring-before(., ".")) < 3) not(string-length(substring-after(., ".")) < 3) string-length(.) < 3

enter image description here

You MUST enter a screen tip for the field, otherwise InfoPath 2010 will DELETE your validation rules. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.