October\Rain\Halcyon\Exception\ModelException
Overview
ModelException used when validation fails, contains the invalid model for easy analysis
Extends
- October\Rain\Exception\ValidationException
- Illuminate\Validation\ValidationException
- Exception
Implements
- Throwable
- Stringable
Public Properties
There are no public properties in the class.
Show inherited public properties
Inherited Public Properties
- $validator - The validator instance. (defined in Illuminate\Validation\ValidationException)
- $response - The recommended response to send to the client. (defined in Illuminate\Validation\ValidationException)
- $status - The status code to use for the response. (defined in Illuminate\Validation\ValidationException)
- $errorBag - The name of the error bag. (defined in Illuminate\Validation\ValidationException)
- $redirectTo - The path the client should be redirected to. (defined in Illuminate\Validation\ValidationException)
Protected Properties
protected Model $model
protected MessageBag $validationErrors
Show inherited protected properties
Inherited Protected Properties
- $fields - that are invalid. (defined in October\Rain\Exception\ValidationException)
- $fieldPrefix - (defined in October\Rain\Exception\ValidationException)
- $errors - in the form of a message bag. (defined in October\Rain\Exception\ValidationException)
- $message - (defined in Exception)
- $code - (defined in Exception)
- $file - (defined in Exception)
- $line - (defined in Exception)
Public Methods
public __construct()
public __construct($model): void
__construct receives the invalid model
public errors()
public errors(): array
errors returns validation errors
public getErrors()
public getErrors(): Illuminate\Support\MessageBag
getErrors returns the message bag instance
public getModel()
public getModel(): October\Rain\Halcyon\Model
getModel returns the model with invalid attributes
Inherited Public Methods
- __toString() - (defined in Exception)
- __wakeup() - (defined in Exception)
- errorBag() - Set the error bag on the exception. (defined in Illuminate\Validation\ValidationException)
- getCode() - (defined in Exception)
- getFields() - (defined in October\Rain\Exception\ValidationException)
- getFile() - (defined in Exception)
- getLine() - (defined in Exception)
- getMessage() - (defined in Exception)
- getPrevious() - (defined in Exception)
- getResponse() - Get the underlying response instance. (defined in Illuminate\Validation\ValidationException)
- getTrace() - (defined in Exception)
- getTraceAsString() - (defined in Exception)
- redirectTo() - Set the URL to redirect to on a validation error. (defined in Illuminate\Validation\ValidationException)
- setFieldPrefix() - increases the field target specificity. (defined in October\Rain\Exception\ValidationException)
- status() - Set the HTTP status code to be used for the response. (defined in Illuminate\Validation\ValidationException)
- withMessages() - Create a new validation exception from a plain array of messages. (defined in Illuminate\Validation\ValidationException)
Protected Methods
Show inherited protected methods
Inherited Protected Methods
- evalErrors() - evaluates errors. (defined in October\Rain\Exception\ValidationException)
- resolveToValidator() - resolves general input for the validation exception. (defined in October\Rain\Exception\ValidationException)
- summarize() - Create an error message summary from the validation errors. (defined in Illuminate\Validation\ValidationException)