/
Validation: Errors and Warnings

Validation: Errors and Warnings

These messaging functions are specialized Custom Logic messages that only work with Custom Validations and while they are valid to use in the other Custom Logic types, the result will not be consistent.

setError

Sets a validation error message. This messages output in the UI if the validation logic returns false. If this function is called multiple times, only the message from the last calls is displayed.

setError(string $message)

Parameters

$message: A string containing the error message.

setWarning

Sets the validation warning message. This messages output in the UI only if the logic does not return false. If this function is called multiple times, only the message from the last calls is displayed.

setWarning(string $message)

Parameters

$message: A string containing the warning message.

setMessage

Sets the validation message. This messages output in the UI only if the logic does not return false. If this function is called multiple times, only the message from the last calls is displayed.

setMessage(string $message, string $type = 'error')

Parameters

$message: A string containing the warning message.

$type: A string type indicating ‘error’ or ‘warning’. The default is ‘error’

 

Related content

Sending a System Message
Sending a System Message
More like this
Querying Data
Querying Data
Read with this
(2024.2) Validation: Errors and Warnings
(2024.2) Validation: Errors and Warnings
More like this
Creating Inbound/Outbound Files
Creating Inbound/Outbound Files
Read with this
(2024.2) Sending a System Message
(2024.2) Sending a System Message
More like this
Callable Functions
Callable Functions
Read with this