Skip to content

Commit 07bfa3c

Browse files
author
gpmn
committed
#366 for Incorrect NumInGroup
1 parent 3ce26af commit 07bfa3c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

validation.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ type validator interface {
1010

1111
type validatorSettings struct {
1212
CheckFieldsOutOfOrder bool
13-
RejectInvalidMessage bool
14-
13+
RejectInvalidMessage bool
1514
}
1615

1716
//Default configuration for message validation.
1817
//See http://www.quickfixengine.org/quickfix/doc/html/configuration.html.
1918
var defaultValidatorSettings = validatorSettings{
2019
CheckFieldsOutOfOrder: true,
21-
RejectInvalidMessage: true,
20+
RejectInvalidMessage: true,
2221
}
2322

2423
type fixValidator struct {
@@ -87,8 +86,6 @@ func validateFIX(d *datadictionary.DataDictionary, settings validatorSettings, m
8786
}
8887
}
8988

90-
91-
9289
return nil
9390
}
9491

@@ -212,6 +209,7 @@ func validateVisitGroupField(fieldDef *datadictionary.FieldDef, fieldStack []Tag
212209
return fieldStack, err
213210
}
214211
} else {
212+
fieldStack = fieldStack[1:]
215213
if childDefs[0].Required() {
216214
return fieldStack, RequiredTagMissing(Tag(childDefs[0].Tag()))
217215
}

0 commit comments

Comments
 (0)