public function setValue($value)
    {
        $this->checkHasEnoughWritePermission();

        $config = $this->configureField();

        $this->validateValue($value);

        if ($config->transform && $config->transform instanceof \Closure) {
            $value = call_user_func($config->transform, $value, $this);
        }

        if (isset($this->type) && !is_null($value)) {
            settype($value, $this->type);
        }

        $this->storage->setValue($this->name, $value);
    }