October\Rain\Database\ModelException

Overview

ModelException is used when validation fails and contains the invalid model for easy analysis

Extends
Implements
  • Stringable
  • Throwable

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

model that is invalid

Show inherited protected properties

Inherited Protected Properties


Public Methods

public __construct()

public __construct($model): void

__construct recevies the troublesome model

public getModel()

public getModel(): October\Rain\Database\Model 

getModel returns the model with invalid attributes

Show inherited public methods

Inherited Public Methods

  • __toString() - (defined in Exception)
  • __wakeup() - (defined in Exception)
  • errorBag() - Set the error bag on the exception. (defined in Illuminate\Validation\ValidationException)
  • errors() - Get all of the validation error messages. (defined in Illuminate\Validation\ValidationException)
  • getCode() - (defined in Exception)
  • getErrors() - returns directly the message bag instance with the model's errors. (defined in October\Rain\Exception\ValidationException)
  • getFields() - returns invalid fields. (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