System:Form:addError

From Aspen Documentation

Triggers a form data validation error message. The message will be stored in an array an error will be set to true.

Since 1.0

Contents

Arguments

void addError' (string $field, string $message)

field
Form field name the error message is associated with.
message
Warning message that may be presented to the user.

Returns

This function does not return any values.

Notes

Examples

Example:

$this->APP->form->addError('title', 'You must enter a title.');