- Use specified default value in struct tags when binding a request input to struct for validation, even if sent empty, not only when not sent at all.
- Add string field to `TestMappingDefault` test case.
- Add test case for not sent form field to default to the value specified via code.
- Add test case for form field sent empty to default to the value specified via code.
Fixes: How to apply default value if empty value provided by client during model binding? #4042, #13042df, #a41721a
* feat(form): add array collection format in form binding
* feat(form): add array collection format in form binding
* test(form): fix test code for array collection format in form binding
The pointer support in url query params (using []*Struct for binding query params) was previously available in Gin, but was removed in commit 0d50ce8 since there wasn't a test case for such a scenario, and so the case block was removed as a redundant one.
* feat(binding): support custom struct tag
Add function `binding.MapFormWithTag` (#2719)
* doc: add 'bind form-data with custom struct tag'
Add 'Bind form-data request with custom struct and custom tag' section (#2719)
* test(binding): add test for MapFromWithTag
* move tests of mapping to separate test file
make 100% coverage of form_mapping.go from form_mapping_test.go file
* fix tests for go 1.6
go 1.6 doesn't support `t.Run(...)` subtests