\Omega\Validation\Exception ValidationException

Validation exception class.

The ValidationException is thrown when validation fails, and it provides a way to store and retrieve validation errors.

Summary

Methods
Properties
Constants
setErrors
getErrors
setSessionName
getSessionName
errors
sessionName
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Properties

$errors

$errors : array

Errors array.

Type

array<string, array<string|int, string>> — Holds an array of validation errors.

$sessionName

$sessionName : string

Session name.

Type

string — Holds the name of the session where validation errors should be stored.

Methods

setErrors()

setErrors(array  $errors) : $this

Set the validation errors.

Parameters

array $errors

Holds an array containing validation errors.

Returns

$this —

getErrors()

getErrors() : array<string,string[]>

Get the validation errors.

Returns

array

An array of validation errors.

setSessionName()

setSessionName(string  $sessionName) : $this

Set the session name for storing validation errors.

Parameters

string $sessionName

Holds the name of the session where validation errors should be stored.

Returns

$this —

getSessionName()

getSessionName() : string

Get the session name for storing validation errors.

Returns

string —

Return the name of the session where validation errors are stored.