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

NameTypeRequiredDescription
formNamestringYesName of the form to validate
formDatastructYesData from the form submission
preProcessDatabooleanNo (default=true)Whether or not to _preprocess_ form submissions (see validation-engine)
ignoreMissingbooleanNo (default=false)Whether or not to ignore entirely missing fields in the supplied data
validationResultanyNoA pre-existing validation result to which to add any errors found during validation
stripPermissionedFieldsbooleanNo (default=true)
permissionContextstringNo (default="")
permissionContextKeysarrayNo
fieldNamePrefixstringNo (default="")Prefix to add to fieldnames in error messages
fieldNameSuffixstringNo (default="")Suffix to add to fieldnames in error messages
suppressFieldsarrayNo
bypassTenantsarrayNo