PHP Validation

Form Tools comes bundled with both PHP and JS validation scripts, which it uses internally to ensure fields within the application's own forms are entered correctly. This tutorial explains how to utilize this PHP validation script in your own forms, what features if offers, how to add it to your forms and where to go for further information. Since there's an awful lot of validation rules, this tutorial won't give a definitive discussion of each feature - that is handled by the script's documentation. Instead it'll just aim to give an explanation of the whole process. It's not too tricky - hopefully you'll be up and running in no time!

Note: currently, you cannot add server-side (PHP) validation to POST or "direct submission" forms. This feature is only for forms that submit their content via the API.

The validation script is found in the /global/code/validation.php file, but this file it automatically included when you include the API in your forms.

Pre-requisites

For this tutorial we're assuming that your form has already been configured with the API and the form submissions are being added to Form Tools. If you're not quite at that juncture yet, see one of the following tutorials:

Edit Page