@@ -34,7 +34,7 @@ func (v *fixValidator) Validate(msg Message) MessageRejectError {
3434 var msgType FIXString
3535 if err := msg .Header .GetField (tagMsgType , & msgType ); err != nil {
3636 if err .RejectReason () == rejectReasonConditionallyRequiredFieldMissing {
37- return requiredTagMissing (tagMsgType )
37+ return RequiredTagMissing (tagMsgType )
3838 } else {
3939 return err
4040 }
@@ -49,7 +49,7 @@ func (v *fixtValidator) Validate(msg Message) MessageRejectError {
4949 var msgType FIXString
5050 if err := msg .Header .GetField (tagMsgType , & msgType ); err != nil {
5151 if err .RejectReason () == rejectReasonConditionallyRequiredFieldMissing {
52- return requiredTagMissing (tagMsgType )
52+ return RequiredTagMissing (tagMsgType )
5353 } else {
5454 return err
5555 }
@@ -114,7 +114,7 @@ func validateFIXT(transportDD, appDD *datadictionary.DataDictionary, settings va
114114
115115func validateMsgType (d * datadictionary.DataDictionary , msgType string , msg Message ) MessageRejectError {
116116 if _ , validMsgType := d .Messages [msgType ]; validMsgType == false {
117- return invalidMessageType ()
117+ return InvalidMessageType ()
118118 }
119119 return nil
120120}
@@ -142,7 +142,7 @@ func validateWalk(transportDD *datadictionary.DataDictionary, appDD *datadiction
142142 }
143143
144144 if fieldDef , ok = messageDef .Fields [int (tag )]; ! ok {
145- return tagNotDefinedForThisMessageType (tag )
145+ return TagNotDefinedForThisMessageType (tag )
146146 }
147147
148148 if _ , duplicate := iteratedTags [int (tag )]; duplicate {
@@ -156,7 +156,7 @@ func validateWalk(transportDD *datadictionary.DataDictionary, appDD *datadiction
156156 }
157157
158158 if len (remainingFields ) != 0 {
159- return tagNotDefinedForThisMessageType (remainingFields [0 ].Tag )
159+ return TagNotDefinedForThisMessageType (remainingFields [0 ].Tag )
160160 }
161161
162162 return nil
@@ -180,7 +180,7 @@ func validateVisitGroupField(fieldDef *datadictionary.FieldDef, fieldStack []tag
180180 var numInGroup FIXInt
181181
182182 if err := numInGroup .Read (fieldStack [0 ].Value ); err != nil {
183- return nil , incorrectDataFormatForValue (numInGroupTag )
183+ return nil , IncorrectDataFormatForValue (numInGroupTag )
184184 }
185185
186186 fieldStack = fieldStack [1 :]
@@ -208,7 +208,7 @@ func validateVisitGroupField(fieldDef *datadictionary.FieldDef, fieldStack []tag
208208 }
209209 } else {
210210 if childDefs [0 ].Required () {
211- return fieldStack , requiredTagMissing (Tag (childDefs [0 ].Tag ()))
211+ return fieldStack , RequiredTagMissing (Tag (childDefs [0 ].Tag ()))
212212 }
213213 }
214214
@@ -265,7 +265,7 @@ func validateRequiredFieldMap(msg Message, requiredTags map[int]struct{}, fieldM
265265 if err := fieldMap .GetField (Tag (required ), field ); err != nil {
266266 //FIXME: add "has..." method?
267267 if err .RejectReason () == rejectReasonConditionallyRequiredFieldMissing {
268- return requiredTagMissing (Tag (required ))
268+ return RequiredTagMissing (Tag (required ))
269269 }
270270 return err
271271 }
@@ -297,11 +297,11 @@ func validateFields(transportDD *datadictionary.DataDictionary, appDD *datadicti
297297
298298func validateField (d * datadictionary.DataDictionary , validFields datadictionary.TagSet , field tagValue ) MessageRejectError {
299299 if len (field .Value ) == 0 {
300- return tagSpecifiedWithoutAValue (field .Tag )
300+ return TagSpecifiedWithoutAValue (field .Tag )
301301 }
302302
303303 if _ , valid := d .FieldTypeByTag [int (field .Tag )]; ! valid {
304- return invalidTagNumber (field .Tag )
304+ return InvalidTagNumber (field .Tag )
305305 }
306306
307307 allowedValues := d .FieldTypeByTag [int (field .Tag )].Enums
@@ -380,7 +380,7 @@ func validateField(d *datadictionary.DataDictionary, validFields datadictionary.
380380 }
381381
382382 if err := prototype .Read (field .Value ); err != nil {
383- return incorrectDataFormatForValue (field .Tag )
383+ return IncorrectDataFormatForValue (field .Tag )
384384 }
385385
386386 return nil
0 commit comments