Files
Tobias 8651a79716 Update tutorial-core-validators.md (#18348)
The `DefaultValueValidator` works only with closures not with any callable as suggested.
See f8337a15c2/framework/validators/DefaultValueValidator.php (L47)

```
    /**
     * {@inheritdoc}
     */
    public function validateAttribute($model, $attribute)
    {
        if ($this->isEmpty($model->$attribute)) {
            if ($this->value instanceof \Closure) {
                $model->$attribute = call_user_func($this->value, $model, $attribute);
            } else {
                $model->$attribute = $this->value;
            }
        }
    }
```
2020-10-29 11:32:14 +03:00
..