model.beforeSetAttribute

Triggered in October\Rain\Database\Concerns\HasAttributes.

Called before the model attribute is set

Example usage:

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