params) || !isset($this->params[$this->field])) { return $this->addError('The param :attribute is null'); } if (is_null($this->params[$this->field])) { return $this->addError('The param :attribute is null'); } if (!in_array($this->params[$this->field], $this->value)) { return $this->addError($this->i()); } return true; } /** * @return string */ private function i(): string { return 'The param :attribute value only in ' . implode(',', $this->value); } }