diff --git a/src/Log/Request.php b/src/Log/Request.php index a0ac1a1..7ae6c0a 100644 --- a/src/Log/Request.php +++ b/src/Log/Request.php @@ -41,11 +41,11 @@ public function behaviors(): array public function rules(): array { return [ - [['method', 'uri', 'headers', 'body',], 'required',], + [['method', 'uri', 'headers',], 'required',], [['method',], 'string', 'max' => 6,], [['method',], 'filter', 'filter' => 'mb_strtoupper',], [['uri',], 'string',], - [['headers',], 'each', 'rule' => ['each', 'rule' => 'string',],], + [['headers',], 'each', 'rule' => ['each', 'rule' => ['string'],],], [['body',], 'string',], ]; } diff --git a/src/Log/Response.php b/src/Log/Response.php index 136b284..2a83821 100644 --- a/src/Log/Response.php +++ b/src/Log/Response.php @@ -45,11 +45,11 @@ public function behaviors(): array public function rules(): array { return [ - [['http_request_id', 'status', 'headers', 'body',], 'required',], + [['http_request_id', 'status', 'headers',], 'required',], [['http_request_id',], 'exist', 'targetRelation' => 'request',], [['http_request_id',], 'unique',], [['status',], 'integer', 'min' => 100, 'max' => 599,], - [['headers',], 'each', 'rule' => ['each', 'rule' => 'string',],], + [['headers',], 'each', 'rule' => ['each', 'rule' => ['string'],],], [['body',], 'string',], ]; }