QuickFIX will validate and reject any poorly formed messages before they can reach your application. An XML file defines what messages, fields, and values a session supports.

Several standard files are in included in the spec directory.

The skeleton of a definition file looks like this.

<fix type="FIX" major="4" minor="1">
    <field name="BeginString" required="Y"/>
    <field name="CheckSum" required="Y"/>
    <message name="Heartbeat" msgtype="0" msgcat="admin">
      <field name="TestReqID" required="N"/>
    <message name="NewOrderSingle" msgtype="D" msgcat="app">
      <field name="ClOrdID" required="Y"/>
    <field number="1" name="Account" type="CHAR" />
    <field number="4" name="AdvSide" type="CHAR">
     <value enum="B" description="BUY" />
     <value enum="S" description="SELL" />
     <value enum="X" description="CROSS" />
     <value enum="T" description="TRADE" />

The validator will not reject conditionally required fields because the rules for them are not clearly defined. Using a conditionally required field that is not preset will cause a message to be rejected.