From 07bfa3c02bd94cdc0d9a0f52876ddfd10fe1fd42 Mon Sep 17 00:00:00 2001 From: gpmn Date: Sat, 2 Mar 2019 00:53:36 +0800 Subject: [PATCH] https://github.com/quickfixgo/quickfix/issues/366 for Incorrect NumInGroup --- validation.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/validation.go b/validation.go index 6e28b8cd0..0c2167b56 100644 --- a/validation.go +++ b/validation.go @@ -10,15 +10,14 @@ type validator interface { type validatorSettings struct { CheckFieldsOutOfOrder bool - RejectInvalidMessage bool - + RejectInvalidMessage bool } //Default configuration for message validation. //See http://www.quickfixengine.org/quickfix/doc/html/configuration.html. var defaultValidatorSettings = validatorSettings{ CheckFieldsOutOfOrder: true, - RejectInvalidMessage: true, + RejectInvalidMessage: true, } type fixValidator struct { @@ -87,8 +86,6 @@ func validateFIX(d *datadictionary.DataDictionary, settings validatorSettings, m } } - - return nil } @@ -212,6 +209,7 @@ func validateVisitGroupField(fieldDef *datadictionary.FieldDef, fieldStack []Tag return fieldStack, err } } else { + fieldStack = fieldStack[1:] if childDefs[0].Required() { return fieldStack, RequiredTagMissing(Tag(childDefs[0].Tag())) }