# File lib/vpim/vcard.rb, line 1367
      def add_field(field)
        fieldname = field.name.upcase
        case
        when [ 'BEGIN', 'END' ].include?(fieldname)
          raise Vpim::InvalidEncodingError, "Not allowed to manually add #{field.name} to a vCard."

        when [ 'VERSION', 'N', 'FN' ].include?(fieldname)
          if @card.field(fieldname)
            raise Vpim::InvalidEncodingError, "Not allowed to add more than one #{fieldname} to a vCard."
          end
          @card << field

        else
          @card << field
        end
      end