Managing Validators

Validators can be applied to individual form fields on your pages to help ensure you supporters supply responses that conform to your data requirements.

The error alert specified in the validator will be displayed automatically if the supporter enters a value that doesn’t match the validator and then submits the page.

Types of validators

Engaging Networks has eleven default validators available plus one custom that you can create:

Type

Description

Required

Use on mandatory form fields and if left blank, it will display your message.

Alphanumeric

You can request that the data entered is letters and numbers only.

Required Alphanumeric

You can request that the data entered is letters and numbers only that is mandatory.

Numeric

You can request that the data entered is numbers only.

Required Numeric

You can request that the data entered is numbers only that is mandatory.

Date

You can request that a value entered in a date field is in a specific date format. You can choose one of the following formats:

  • mm/dd/yy
  • mm/dd/yyyy
  • dd/mm/yy
  • dd/mm/yyyy
  • dd/mm
  • mm/yy
  • mm/yyyy

NOTE: The tagged field “SUPPORTER BIRTHDAY” has to be formatted as YYYY-MM-DD and should not use this validator.

Required Date

You can request that a value entered in a date field is in a specific date format that is mandatory.

Email

You can validate if the value entered in the email address field is a valid email format.

Required phone number

The field should include the “+” country code at the start, for example +44123456789. This format is required for click to call pages

Custom

You can create a tailored validator using regular expressions (regex) such as:

  • ^(\d{5}-\d{4})|(\d{5})$ – validates that 5 numbers are entered or 5 numbers, a dash and 4 numbers (ie. zip code validator)
  • (blue|orange|red) – validates that either blue or orange or red is inputted
  • More examples below and at this link. 

Donation Amount

You can set a minimum and maximum donation amount allowed on the form. Enter the min~max (5~1000) separated by a ~ symbol.

ISO Date

You can validate that the date entered is in the ISO (international) date format YYYY-MM-DD.

NOTE: Each validator will have an error alert for each locale enabled in your account.

Creating validators

To create a new validator, go to Pages > Alerts & Validators

Click on the new validator button and select the validator type.

Enter a name for your validator as well as the error message the supporter will receive if the validator is triggered.

Managing Validators

To edit an existing validator, click on the edit icon .

To delete an existing validator, click on the delete icon .

Custom Validators

Some examples below and at Github

Type Expression
Account number (8 digits)
^\d{8}$
Credit card number (16 digits)
^\d{16}$
CVV number (3 or 4 digits)
^\d{3,4}$
First name longer than 1 character
^.{2,}$
Sort code (6 digits no hyphens)
^\d{6}$
Updated on September 18, 2019

Was this article helpful?

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support