Data pattern validation in InfoPath 2003 SP1
I'm still working my way through the online labs for InfoPath available at MSDN.COM. Today I came across a regular expression builder that's part of the data validation tool set.
When you select a form field you want to validate, you can indicate that you want to validate it based on a pattern. A magical "Data Entry Pattern" dialog box is displayed. There are a few standard patterns inside (phone number, SSN, Zip, and Zip + 4) but the magic is when you need to do a custom pattern.
In the past I've pulled my hair out trying to write a regular expression that works right. I've Googled my way around the web, looked for examples, and try, change, try, change, try, change, and on and on and on.... Argh!
But this Data Entry Pattern dialog box has a simple combination of a text box (that I can type in) and a drop down list (containing "special characters" such as left paren, right paren, one or more, none or more, etc.) that lets me do what I need to do - without the pain of guessing! And it shows me an example of what a valid match looks like. In seconds I have a pattern defined that does exactly what I want it to.
I like this!
The "Data Entry Pattern" dialog box in InfoPath.
Best thing since sliced bread.