Cornerstone Forms Validations

Protect your Forms with built-in Validation rules that check required fields, character counts, emails, numbers, dates and more.

  1. The Basics
  2. Required
  3. Character Comparison
  4. Date
  5. Email
  6. Nonce
  7. Number Comparison
  8. ValidChoices
  9. Summary

The Basics

Click on the Validations Input to show the list of Validations. Each Validation can have its own custom error message.

Validations Controls

Required

One of the most simple Validations, this will check if there is any data for the Input.

Character Comparison

This Validation can check the data has a certain number of characters. This can be useful if you want to ensure the user will send you at least 100 characters. Or if you want to prevent long messages by having less than 100 characters.

Date

An example here would be if you want to age-gate a Form or page for people over the age of 21.

Email

This Validation checks if the Input is a valid email. This uses the WordPress function is_email internally.

Nonce

This is a very specific Validation that uses the wp_verify_nonce function. You should use the Nonce prefab if you want a Nonce added to your Form as it will setup everything for you. See CAPTCHA & Security for more on Nonce setup.

Number Comparison

You can use this Validation to ensure a number is equal, greater, or less than a comparison number. Using two of these Validations can get you a valid range of numbers using greater and less than.

ValidChoices

If you want a certain number of answers, you can use this Validation to have answers within the choices. When using the Select Element and Radio and Check list Elements this is unnecessary and will check if the data is in the valid options.

Summary

Validations ensure your Forms collect clean, reliable data. They work alongside Conditions for visibility control and Actions for post-submission processing.

See something inaccurate? Let us know