model.beforeSetAttribute

Triggered in October\Rain\Database\Model.

Called before the model attribute is set

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

Example usage:

$model->bindEvent('model.beforeSetAttribute', function ((string) $key, $value) use (\October\Rain\Database\Model $model) {
    if ($key === 'not-for-you-to-touch') {
        return '$value has been touched! The humanity!';
    }
});