Neuron-PHP

ValidationException extends CmsException
in package

Exception thrown when validation fails

Table of Contents

Properties

$userMessage  : string
$errors  : array<string|int, string>

Methods

__construct()  : mixed
getErrors()  : array<string|int, string>
Get all validation errors
getUserMessage()  : string
Get user-friendly error message safe for display
shouldLog()  : bool
Validation errors don't need to be logged by default

Properties

Methods

__construct()

public __construct(string|array<string|int, string> $errors[, int $code = 0 ][, Throwable|null $previous = null ]) : mixed
Parameters
$errors : string|array<string|int, string>

Validation error(s)

$code : int = 0

Error code

$previous : Throwable|null = null

Previous exception

getErrors()

Get all validation errors

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

getUserMessage()

Get user-friendly error message safe for display

public getUserMessage() : string
Return values
string

shouldLog()

Validation errors don't need to be logged by default

public shouldLog() : bool
Return values
bool

        
On this page

Search results