yii\validators\EachValidator::validateValue PHP Method

validateValue() protected method

protected validateValue ( $value )
    protected function validateValue($value)
    {
        if (!is_array($value)) {
            return [$this->message, []];
        }
        $validator = $this->getValidator();
        foreach ($value as $v) {
            if ($validator->skipOnEmpty && $validator->isEmpty($v)) {
                continue;
            }
            $result = $validator->validateValue($v);
            if ($result !== null) {
                if ($this->allowMessageFromRule) {
                    $result[1]['value'] = $v;
                    return $result;
                } else {
                    return [$this->message, ['value' => $v]];
                }
            }
        }
        return null;
    }