src/core/validator/Validator.php
public function addItem(array $item): self
    {
        if (count($item) < 2) {
            throw new Exception('Invalid count of item elements.');
        }
        $this->items[] = $item;
        return $this;
    }
public function addItem(array $item): self
    {
        if (count($item) < 2) {
            throw new Exception('Invalid count of item elements.');
        }
        $this->items[] = $item;
        return $this;
    }
The method adds a set of fields and their corresponding rules and parameters
for validating the input data
@param array $item This set is an array whose first element is a string
with a field name (or an array of field names), the second element is the
name of the validation rule (always a string), the third element is an
optional array of validation options.
@return self
@throws \extensions\validator\Exception