Documentation

ValidationException extends ValidationException
in package

AbstractYes

Validator errors.

Use karmabunny\kb\ValidationException.

Table of Contents

Properties

$errors  : array<string|int, mixed>
Keyed string => string[].

Methods

addErrors()  : static
Merge errors properly.
getErrors()  : array<string|int, mixed>
Get the validation errors.
getSummary()  : string
Create a summary messages from an error set.

Properties

$errors

Keyed string => string[].

public array<string|int, mixed> $errors = []

[ item => [errors] ]

Methods

addErrors()

Merge errors properly.

public addErrors(array<string|int, mixed> $errors) : static

Whereas array_merge() will clobber messages within duplicate keys.

Parameters
$errors : array<string|int, mixed>
Return values
static

getErrors()

Get the validation errors.

public getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed> —

[ item => [errors] ]

getSummary()

Create a summary messages from an error set.

public static getSummary(array<string|int, mixed> $errors) : string
Parameters
$errors : array<string|int, mixed>
Return values
string
On this page

Search results