validateForm()
Overview
public any function validateForm(
required string formName
, required struct formData
, boolean preProcessData = true
, boolean ignoreMissing = false
, any validationResult
, boolean stripPermissionedFields = true
, string permissionContext = ""
, array permissionContextKeys
, string fieldNamePrefix = ""
, string fieldNameSuffix = ""
, array suppressFields
, array bypassTenants
)
Validates the given form using the Validation framework. Returns a validation result object.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| formName | string | Yes | Name of the form to validate |
| formData | struct | Yes | Data from the form submission |
| preProcessData | boolean | No (default=true) | Whether or not to _preprocess_ form submissions (see validation-engine) |
| ignoreMissing | boolean | No (default=false) | Whether or not to ignore entirely missing fields in the supplied data |
| validationResult | any | No | A pre-existing validation result to which to add any errors found during validation |
| stripPermissionedFields | boolean | No (default=true) | |
| permissionContext | string | No (default="") | |
| permissionContextKeys | array | No | |
| fieldNamePrefix | string | No (default="") | Prefix to add to fieldnames in error messages |
| fieldNameSuffix | string | No (default="") | Suffix to add to fieldnames in error messages |
| suppressFields | array | No | |
| bypassTenants | array | No |