The Form Submission service plugin (formerly SPI) allows site owners and collaborators to validate a site visitor's filled form. For example, you can validate whether a correct email is entered into the field. Site owners and collaborators can either write their own custom validation logic, or integrate with a 3rd-party validations provider.
Wix Forms calls validateSubmission()
to validate a site visitor's filled form.
The custom validation plugin code validates the request, and returns any validation violation data in a site visitor's form (using the structure provided by Wix Forms).
If there aren't any validation violations, the function should return an object containing an empty array. Site visitors can see validation violations in their forms.
namespace
for the Wix Forms app is wix.form_app.form
.getConfig()
function in the -config.js file that is added to your site during step 1.validateSubmission()
function in the .js file that is added to your site during step 1.With the Validations service plugin you can define the validations for a site form that fit your site's needs. Possible validations include:
Term | Definition |
---|---|
Submission | Data received when a site visitor submits a form. |
Validation | Process that makes sure the information that the site visitor put into a form is correct and meets certain rules. |
Target | Online interface that allows site visitors to input and submit data. |