anchor.diff:                                         {'via', [Via1Up]},
                                          {'via', [Via2]}]},
       NoViaMsg = #sip_message{headers = [{'content-length', 123}, {'cseq', CSeq}]},
  +
  +    URI = <<"sip@nowhere.invalid">>,
  +    ValidRequest =
  +        #sip_message{start_line = {request, 'OPTIONS', URI},
  +                     headers = [{to, sip_headers:address(<<>>, URI, [])},
  +                                {from, sip_headers:address(<<>>, URI, [])},
  +                                {cseq, sip_headers:cseq(1, 'OPTIONS')},
  +                                {'call-id', <<"123">>},
  +                                {'max-forwards', 70},
  +                                {via, sip_headers:via(udp, <<"localhost">>, [])}]},
  +
  +    % No contact in INVITE
  +    InvalidRequest =
  +        ValidRequest#sip_message{start_line = {request, 'INVITE', URI}},
       [% Header lookup functions
        ?_assertEqual({ok, Via1}, top_header('via', [{'via', [Via1, Via2]}])),
        ?_assertEqual({ok, <<"z9hG4bK776asdhds">>}, top_via_branch(#sip_message{headers = [{'via', [Via1]}, {'via', [Via2]}]})),
  
positive.code: %% @end
  -spec validate_request(message()) -> ok | {error, Reason :: term()}.
  validate_request(Request) when is_record(Request, sip_message) ->
      CountFun =
          fun ({Name, Value}, Counts) ->
                   % assign tuple index for every header being counted
  
negative.code:                            'call-id' -> 4;
                             'max-forwards' -> 5;
                             'via' -> 6;
                             'contact' -> 7;
                             _ -> 0
                         end,
                   if
  