public function invalid($field = null, $value = null, $overwrite = false)
    {
        deprecationWarning(
            get_called_class() . '::invalid() is deprecated. ' .
            'Use setInvalid()/getInvalid()/getInvalidField() instead.'
        );
        if ($field === null) {
            return $this->_invalid;
        }

        if (is_string($field) && $value === null) {
            $value = isset($this->_invalid[$field]) ? $this->_invalid[$field] : null;

            return $value;
        }

        if (!is_array($field)) {
            $field = [$field => $value];
        }

        foreach ($field as $f => $value) {
            if ($overwrite) {
                $this->_invalid[$f] = $value;
                continue;
            }
            $this->_invalid += [$f => $value];
        }

        return $this;
    }