ModelException

Used when validation fails. Contains the invalid model for easy analysis.

 class Winter\Storm\Halcyon\Exception\ModelException
extends Winter\Storm\Exception\ValidationException

Extends

Class Description
ValidationException

Validation exception class.

Properties

protected $model : Model

The invalid model.

inherited protected $errors : Illuminate\Support\MessageBag

Inherited from ValidationException

The message bag instance containing validation error messages

inherited protected $fields : array

Inherited from ValidationException

Collection of invalid fields.

Methods

public __construct (Winter\Storm\Halcyon\Model $model)

Receives the invalid model and sets the {@link model} and {@link errors} properties.

Parameters
Property Description
$model
Winter\Storm\Halcyon\Model

The troublesome model.

Returns
mixed

public getModel () : Model

Returns the model with invalid attributes.

Returns

inherited public getErrors () : Illuminate\Support\MessageBag

Inherited from ValidationException

Returns directly the message bag instance with the model's errors.

Returns
Illuminate\Support\MessageBag

inherited public getFields ()

Inherited from ValidationException

Returns invalid fields.

Returns
mixed

inherited protected evalErrors ()

Inherited from ValidationException

Evaluate errors.

Returns
mixed
Copyright © 2024 Winter CMS