_validator($this->field, function ($field, $params, $origin, $type) { $value = $params[$field] ?? null; if ($type !== self::MIN && $value < $origin) { return $this->addError($field,'The ' . $field . ' cannot be less than the default value.'); } if ($type !== self::MAX && $value > $origin) { return $this->addError($field,'The ' . $field . ' cannot be greater than the default value.'); } return true; }, $this->params, $this->value, $this->type); } }