Help center

Set validation rules on form fields

Require business emails, check VAT and tax ID formats, limit numbers and dates, and test an answer before you save the application form.

Updated 3 min read

Validation rules stop applications with unusable answers, like a personal Gmail address or a VAT number in the wrong format, before they reach you. Open a field’s editor in Settings › Application form and set its rules in the Validation box. B2B Desk checks the rules in the applicant’s browser and again when the application is saved.

Rules by field type

Field type Rules you can set
Short answer Format, Minimum characters, Maximum characters
Paragraph Minimum characters, Maximum characters (up to 2,000)
Number Minimum, Maximum, Whole numbers only
Date Allowed dates: Any date, Today or earlier, Today or later
Email Only accept business email addresses

Some checks always run and need no setup: emails must be real email addresses, phone numbers must be 5 to 20 digits with or without a country code, websites must look like example.com, and dropdown or multiple-choice answers must be one of your choices.

Require a format

Choose Match a format, like ##-####### under Format, then write one format per line in Formats:

  • # is a digit
  • @ is a letter
  • * is either
  • Anything else must appear exactly as typed, like GB or -

Under the box, “Fits:” shows sample answers so you can check you wrote what you meant.

Number Format
UK VAT GB#########
German VAT DE#########
French VAT FR**#########
Dutch VAT NL#########B##
US EIN ##-#######
Canadian GST/HST number #########RT####

An answer passes when it matches any one of your formats, from start to finish. Spaces before and after are ignored. Letters you typed into a format, like GB, must match in the same case, so gb123456789 doesn’t fit GB#########. You can list up to 10 formats per field.

The other Format options are Numbers only (0–9) and Letters and numbers only.

Accept business emails only

Tick Only accept business email addresses on the Email field to turn away addresses from 27 free email providers, including gmail.com, outlook.com, hotmail.com, yahoo.com, icloud.com, aol.com and proton.me. Applicants with one see “Use your business email address, not a personal one.”

Requiring a business email also makes duplicate detection and auto-approve rules more reliable, since both use the email’s domain.

Write your own error message

Once a field has a rule, an Error message box appears. Applicants see your message, up to 200 characters, instead of the default when an answer breaks a rule. Write what you want them to type, for example “Enter your VAT number, starting with GB.”

Your message never replaces the messages for a missing required answer, a wrong file type, a file that’s too large, or an answer that isn’t one of the choices.

Test an answer

Type a sample into Test an answer to see the result before you save. It shows “Passes” or “Doesn’t pass” with the exact message applicants would see. Nothing you type is saved. Testing works on Short answer, Paragraph, Number, Email, Phone number and Website link fields.

Default messages applicants see

Situation Message
Required field left empty “This field is required.”
Wrong format “Use the format” followed by a sample from your first format
Too short or too long “Enter at least 5 characters.” or “Use 64 characters or fewer.”
Number out of range “Enter 10 or more.” or “Enter 500 or less.”
Date outside the allowed range “Choose today or an earlier date.” or “Choose today or a later date.”
Invalid email “Enter a valid email address.”
Invalid phone “Enter a valid phone number.”