error()
Usage
error(propertyKey, token, detail)
error(propertyKey, token)
Description
This method can be used to signal an error condition during Scripting execution. It is mainly used in Entity Callback Functions like onCreate()
or onSave()
to allow the user to implement custom validation logic.
Examples
${error('name', 'name_not_allowed')}
${error('name', 'name_not_allowed', 'The given name is not allowed.')}
results in an HTTP 422 Unprocessable Entity error.