model.beforeUpdate

Triggered in October\Rain\Database\Model.

Called before the model is updated

Note: also triggered in October\Rain\Halcyon\Model

Example usage:

$model->bindEvent('model.beforeUpdate', function () use (\October\Rain\Database\Model $model) {
    if (!$model->isValid()) {
        throw new \Exception("Invalid Model!");
    }
});