Minimum length in field - InfoPath Dev
in

InfoPath Dev

Minimum length in field

Last post 08-15-2008 07:30 AM by spyderbyte. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-14-2008 07:04 AM

    Minimum length in field

    Newbie question here:

    What is the easiest way to enforce a minimum length in an Integer or text field? (Browser Enabled Infopath Form)

     

    Best Regards,

    Lance

  • 08-14-2008 07:27 AM In reply to

    Re: Minimum length in field

    Hello, and welcome!

    Data validation should work for this:

    1. Right click on the field and select Data Validation
    2. If you want the user to be able to leave the field blank, set the first condition to field is not blank
    3. Set a condition to field does not match pattern and select Select a pattern
    4. In the Custom Pattern area, you can create a pattern. For example .{3,} would allow the user to type in any characters, as long as there were at least 3. .{3,25} allows any character, at least 3 and up to 25. \d{3,25} gives you from 3 to 25 numbers
    5. Put in a screen tip (the message portion won't show in a browser form)

    Let me know if you need more help or have trouble with this, okay?

    Hilary Stoupa

  • 08-14-2008 10:37 AM In reply to

    Re: Minimum length in field

    Thank you Hilary, that worked perfectly. What are some good resources for defining use cases of patterns? Is there a "Bible" on this topic?

     

    Best Regards,

    Lance

  • 08-14-2008 11:10 AM In reply to

    Re: Minimum length in field

    I actually have a follow up question to this. Now the field that has this data validation in it contains an asteric * like it is a required field is there a way to get this to go away?

  • 08-14-2008 11:18 AM In reply to

    Re: Minimum length in field

    Did you add as part of the data validation the condition field is not blank? I think if you have field is not blank AND field does not match pattern you'll not have that asterisk.

    The best resource I've found for data validation patterns in InfoPath is this forum... If someone else knows of a great link or site, please post!

    Hilary Stoupa

  • 08-15-2008 07:30 AM In reply to

    Re: Minimum length in field

    That's what I missed. Thank you so much for your help.

     

    Lance

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.