Open ngocchien opened 1 month ago
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
@gaby
Look at this regarding to #3203
For JSON it will work
For forms it will not work if you allow comma (,) in value.
Question Description
I have a field in my form, its name is the description
Example:
On my server side, I define a struct with the information:
I have a problem with binding data from the form to my formData. My expectation data for formData.Description is []string{"description, this is a description for item one, the first item is very nice, bla bla bla", "description2", "description3"} (This has 3 values for the slice). But currently, I received for formData.Description after binding data is []string{"description1", "this is a description for item one", "the first item is very nice", "bla bla bla", "description2", "description3"} (This has 6 values for the slice).
It seems that the Bind() function has split the value of the description field of the first item into a slice by the "," , so I received the data for formData.Description is []string{"description1", "this is a description for item one", "the first item is very nice", "bla bla bla", "description2", "description3"}.
Who can resolve my problem? Thank you so much!
Code Snippet (optional)
Checklist: