Skip to content

Commit

Permalink
fix: check array values
Browse files Browse the repository at this point in the history
  • Loading branch information
kolaente committed Jan 24, 2025
1 parent ce0b12a commit 682dfde
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,12 @@ func (b *DefaultBinder) bindData(destination interface{}, data map[string][]stri
}
}

inputValue, exists := data[inputFieldName]
var inputValue []string
var exists bool
inputValue, exists = data[inputFieldName]
if !exists {
inputValue, exists = data[inputFieldName+"[]"]
}
if !exists {
// Go json.Unmarshal supports case-insensitive binding. However the
// url params are bound case-sensitive which is inconsistent. To
Expand Down

0 comments on commit 682dfde

Please sign in to comment.