addError()
Overview
public void function addError(
required string fieldName
, required string message
, array params
)
Adds an error report to the result.
Arguments
Name | Type | Required | Description |
---|---|---|---|
fieldName | string | Yes | The name of the field to which the message pertains |
message | string | Yes | The error message, can be plain text or an i18n resource key |
params | array | No | If the message is an i18n resource key, params can be passed here to be used as token replacements in the translation |