Field Validation Enhancements

13 January 2015 by Bryan McBride

Our latest updates include some great form validation enhancements for even better quality control over your data. These enhancements include supporting custom validation patterns for text fields by defining a regular expression (regex), as well as the ability to define min/max limits for certain field types.

Pattern Matching with Regex

We’ve added the ability for you to define your own custom text validation in our app designer by simply defining a regular expression pattern. Our validation pattern builder includes a few popular regular expressions, but you also have the ability to paste in any valid regex pattern.

Let’s say you want a specific text field to restrict entries and only accept the value of years between 1900 and 2099, you could include the following regex pattern when designing your data collection form: [(19|20)[\d]{2,2}. You can test the regex pattern within the app designer, to verify it is working as expected before deploying to your field collectors. Entries that don’t match your pattern will alert both web and mobile users and prevent them from saving the record until corrected.

Min/Max Validations

In addition to pattern matching, we’ve included the ability to set min/max restrictions for several field types. These validations vary by field type with the following fields currently supported:

  • Text Field- Set the min and max character length for a text field.
  • Numeric Field- Set the min and max character length for a numeric field.
  • Multiple Choice- Set the min and max number of selections that can be made.
  • Photos/Videos- Set the min and max number of photos that can be captured.
  • Repeatable Section- Set the min and max number of child records that can be created.

Data Integrity

The importance of data integrity cannot be understated when it comes to field data collection. Data collection is expensive, and if you are paying field crews to collect information, you want the data they capture to be of the highest quality so that it can be readily analyzed, mapped, or queried. These validation enhancements, along with advanced visibility rules and requirement condition logic allow you to create highly sophisticated data collection apps that combine field efficiency with data integrity.

Now go out there and brush up on your regex skills, because you never know when you might be called upon to save the day!

xkcd Regex

Courtesy of:

About the author

Bryan is a software engineer with Fulcrum, and works with our web and backend platform.

comments powered by Disqus

Sign Up Today & Start Collecting Data In Just Minutes!

Start Your FREE Trial