Visitor Field Validation

Visitor fields are the fields in Qualified where you will store everything you wish to track and know about your website visitors. Visitor fields contain information you might gather through chatting/talking to a lead directly, information they might have given you explicitly through a lead form or bot, or other info that might be pulled from an external system, like Salesforce, Pardot or Clearbit. 

In this guide, we’ll go over how to place validation rules on your visitor fields to ensure the data you’re collecting from visitors is accurate and formatted correctly.

Getting Started

To get started you’ll want to first login to your Qualified.com account and navigate to your Visitor Fields area. Once you’re in here, you’ll need to determine if an existing visitor field needs to be formatted in a certain way, or if you’d like to add a new visitor field and validation rule. You can edit existing visitor fields at any time.

Click on the “Add Validation” area next to your visitor field to add a validation.

Adding validation to visitor fields.


Notice that you can only add validation to your text fields and the fields that we already validate for you based on common formatting such as:

  • Phone
  • Email

And those fields we cannot add validation to:

  • Number Fields
  • Picklist

Some common uses for field validation are email and phone (we do this automatically as mentioned above). However, you might want to validate other fields as well such as: zipcode, url, product serial number, or unique username.

Qualified has identified some common validation criteria and offer these out of the box while others you can create custom on your own. 

Out of the Box Validations

Qualified has some out of the box validations already set up for you, including postal code and URL. When you select one of these validation rules you’ll see the syntax we use behind the scenes to make sure the validation works correctly, this is called a regular expression and it’s used as an industry standard. We’ll talk about those more when we go over custom validations below.

Select your out of the box validation rule by selecting it from the drop down box in the pop up modal as shown below.


Selecting an out of the box validation rule.


Once you’ve finished your selection, you’ll want to press ‘save’ on your visitor fields to ensure the validation starts taking place immediately for your visitors.

Custom Validation Rules

Qualified gives you the opportunity to create your own validation rules for your visitor fields if we don’t have your rule out of the box. This could include specific username validations, product id’s, or serial numbers.

Behind the scenes Qualified uses Regular Expressions to create validation rules, which is an industry standard programming language that you can read more about.

Before we jump in, you’ll want to be aware that unless you have a background in computer science, most likely you’ll need some help from our support team to get the custom validation you need. That’s okay! We’re here to help and want to make this as easy as possible for you. 

Regular expressions have a reputation for being gnarly, but that all depends on how you approach them. There is a natural progression from something as simple as this:

\d

To something as complicated as the expression below.

^(\(\d{3}\)|^\d{3}[.-]?)?\d{3}[.-]?\d{4}$

You can see then how you might need some help from our team, so feel free to reach out and let us know what you’re trying to validate so that we can help write out the regular expression for you.

To give you some ideas on how to use regular expressions we’ve given you an example below of a custom validation rule and the regular expressions used to create them.

Example: Serial Number

In this example, we’ll use serial number as our visitor field validation rule. As visitors come to the site, they can speak with our team and get more information about add-on’s for the product they’ve recently purchased. In order for our team to know the exact product, we’ll ask the visitor to give us the product serial number and validate that against a regular expression.

All serial numbers should have the same structure in our made up company: ABCD-1234-XYZ. To get started we’ve created a visitor field titled “Serial Number” and we’ve selected to create a custom rule to validate the data that visitors enter into this field.


Creating a custom validation rule.


You’ll notice above that our regular expression looks like:

 ^[A-Z]{4}-\d{3}-[A-Z]{3}$

In plain English this means:

^ The start of the expression

[A-Z]{4} The first group of characters should be any uppercase letters A-Z and only allow 4 of them followed by a dash.

\d{3} The next group of characters should be only digits 0-9 and allow only 3 of them followed by a dash

[A-Z]{3} The last group of characters should be any uppercase letters A-Z and only allow 3 of them.

$ Do not validate any other characters that are added beyond this.

Regular Express (Regex) Resources

Summary

Visitor fields allow for you to store data about your visitors as well as display data to your sales team about your visitors coming from outside sources such as Salesforce. Using visitor field validation you can ensure that the data visitors are giving to you via Qualified is in a strict format and valid. While Qualified will validate some data out of the box for you, you can also choose to create custom validation rules using regular expressions or Regex.

Request a live demo

See Qualified in action on your website. Request a live demo and one of our reps will contact you immediately, or talk to us right now.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Free custom demo
Live on your site