addError()

Overview

public void function addError(
      required string fieldName
    , required string message  
    ,          array  params   
)

Adds an error report to the result.

Arguments

NameTypeRequiredDescription
fieldNamestringYesThe name of the field to which the message pertains
messagestringYesThe error message, can be plain text or an i18n resource key
paramsarrayNoIf the message is an i18n resource key, params can be passed here to be used as token replacements in the translation