PHP Class Esensi\Model\Observers\ValidatingModelObserver

See also: Esensi\Model\Traits\ValidatingModelTrait
See also: Watson\Validating\ValidatingObserver
Deprecation: In watson/[email protected] the custom methods used below were deprecated in favor of Laravel 5's form request validation classes. Stop using rulesets right now as they will be removed
Author: Daniel LaBarge ([email protected])
Inheritance: extends Watson\Validating\ValidatingObserver
ファイルを表示 Open project: esensi/model

Public Methods

Method Description
creating ( Model $model ) : boolean Register the validation event for creating the model.
deleting ( Model $model ) : boolean Register the validation event for deleting the model.
restoring ( Model $model ) : boolean Register the validation event for restoring the model.
saving ( Model $model ) : boolean Register the validation event for saving the model. Saving validation should only occur if creating and updating validation does not.
updating ( Model $model ) : boolean Register the validation event for updating the model.

Protected Methods

Method Description
performValidation ( Model $model, string $event ) : boolean Perform validation with the specified ruleset.

Method Details

creating() public method

Register the validation event for creating the model.
public creating ( Model $model ) : boolean
$model Illuminate\Database\Eloquent\Model
return boolean

deleting() public method

Register the validation event for deleting the model.
public deleting ( Model $model ) : boolean
$model Illuminate\Database\Eloquent\Model
return boolean

performValidation() protected method

Perform validation with the specified ruleset.
protected performValidation ( Model $model, string $event ) : boolean
$model Illuminate\Database\Eloquent\Model
$event string
return boolean

restoring() public method

Register the validation event for restoring the model.
public restoring ( Model $model ) : boolean
$model Illuminate\Database\Eloquent\Model
return boolean

saving() public method

Register the validation event for saving the model. Saving validation should only occur if creating and updating validation does not.
public saving ( Model $model ) : boolean
$model Illuminate\Database\Eloquent\Model
return boolean

updating() public method

Register the validation event for updating the model.
public updating ( Model $model ) : boolean
$model Illuminate\Database\Eloquent\Model
return boolean