public function isUnique(array $fields, $message = null)
    {
        $options = [];
        if (is_array($message)) {
            $options = $message + ['message' => null];
            $message = $options['message'];
            unset($options['message']);
        }
        if (!$message) {
            if ($this->_useI18n) {
                $message = __d('cake', 'This value is already in use');
            } else {
                $message = 'This value is already in use';
            }
        }

        $errorField = current($fields);

        return $this->_addError(new IsUnique($fields, $options), '_isUnique', compact('errorField', 'message'));
    }