protected function fieldNameError(FormField $field, $functionName)
    {
        if ($this->form) {
            $errorSuffix = sprintf(
                " in your '%s' form called '%s'",
                get_class($this->form),
                $this->form->getName()
            );
        } else {
            $errorSuffix = '';
        }

        user_error(
            sprintf(
                "%s() I noticed that a field called '%s' appears twice%s",
                $functionName,
                $field->getName(),
                $errorSuffix
            ),
            E_USER_ERROR
        );
    }