File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 3434 ) error
3535 CreateValidateFn (
3636 mapper * govalidatormapper.Mapper ,
37- auxiliaryValidatorFn interface {},
37+ auxiliaryValidatorFns ... interface {},
3838 ) (
3939 func (
4040 dest interface {},
@@ -134,7 +134,7 @@ func (d *DefaultService) Birthdate(
134134// func(dest *RequestType, validations *govalidatormappervalidation.StructValidations) error
135135func (d * DefaultService ) CreateValidateFn (
136136 mapper * govalidatormapper.Mapper ,
137- auxiliaryValidatorFn interface {},
137+ auxiliaryValidatorFns ... interface {},
138138) (
139139 func (
140140 dest interface {},
@@ -174,13 +174,15 @@ func (d *DefaultService) CreateValidateFn(
174174 }
175175
176176 // Call the validate function
177- _ , err = goreflect .SafeCallFunction (
178- auxiliaryValidatorFn ,
179- dest ,
180- rootStructValidations ,
181- )
182- if err != nil {
183- panic (err )
177+ for _ , auxiliaryValidatorFn := range auxiliaryValidatorFns {
178+ _ , err = goreflect .SafeCallFunction (
179+ auxiliaryValidatorFn ,
180+ dest ,
181+ rootStructValidations ,
182+ )
183+ if err != nil {
184+ panic (err )
185+ }
184186 }
185187
186188 // Parse the validations
You can’t perform that action at this time.
0 commit comments