Field Validation
Purpose: Allow custom validation on any given field collected in LegalServer
Cost: This feature is in Beta and Cost is TBD.
To enable, please file a ticket to request it on your Demo site.
Fields present on dynamic form will get a checkbox on the back end Use Regex Validation
. If that box is checked, two new options appear. A Text Area for the Regex Pattern (required) and a text field for the Regex Validation Failure Message.

If a user puts in something that doesn't meet the Regex pattern, they will get a validation error on saving and have to fix it. It is best practice to have the validation message explain what the appropriate pattern is. While the example above just says Invalid entry
, a better failure message might say Invalid entry. Must have 3 letters followed by 10 numbers.

What is Regex?
Regex or Regular Expressions are a sequence of characters that defines a search pattern. These patterns can be used for text search and text replace operations, as well as input validation. Think of them as a specialized mini-language for pattern matching within text.
How do I write a Regex Expression?
There are many Regex testing sites available online from a search. Many common patterns are widely available. You can also ask a generative AI tool to give you a specific regex pattern for a given situation.
What are possible Use Cases?
Some Examples:
- Docket Numbers to just ##-AA-#### -
\d{2}-AA-\d{4}
- Organization Names without periods or commas -
^[a-zA-Z0-9]+$
- Email Addresses with an @ sign and a .com/.org/.edu -
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.(com|org|edu)$