Cornerstone Forms Validations
Validations are a way to prevent bad data in a visual manner. In this article we explain all available Validations.
The Basics
Click on the validations input to show the list of validations. Each validation can have it's own custom error message.

Required
One of the most simple validation, this will check if there is any data for the input.
Character Comparison
This is 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 then 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.
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.
Number Comparison
You can use this validation to ensure a number if equal, greater, or less than a validation number. Using two of these validation can get you a valid range of numbers using greater and less then.
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.
See Also
See something inaccurate? Let us know