Inputfield::getErrors()

Return array of strings containing errors that occurred during input processing

Note that this is different from Wire::errors() in that it retrieves errors from the session rather than just the current run.

Usage

// basic usage
$array = $inputfield->getErrors();

// usage with all arguments
$array = $inputfield->getErrors(bool $clear = false);

Arguments

NameType(s)Description
$clear (optional)bool

Optionally clear the errors after getting them (Default=false).

Return value

array


Inputfield methods and properties

API reference based on ProcessWire core version 3.0.252