PostValidationException

Class. It extends InvalidArgumentException.

use Saij\WpAppFramework\Post\PostValidationException;

Thrown by AbstractPost::save() when a meta value does not match its schema; nothing is written then.

Constructor

new PostValidationException(array $errors)
ParameterTypeDefaultDescription
errorslist<string>requiredOne message per invalid value, with the meta class and the path.

Methods

getErrors()

getErrors(): array

The messages of the invalid values, one per value, with the meta class and the path of the value.

Returns list<string>