gin/binding
ahmadsaeedgoda 497351c8dd fix: Set default value for form fields if sent empty
- 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
2024-09-04 06:08:25 +03:00
..
2024-05-13 11:11:56 +08:00
2022-05-30 15:16:10 +08:00