Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple values format "<FIELD_NAME>[]" #6

Open
kale1d0code opened this issue Dec 16, 2024 · 0 comments
Open

Support multiple values format "<FIELD_NAME>[]" #6

kale1d0code opened this issue Dec 16, 2024 · 0 comments

Comments

@kale1d0code
Copy link

kale1d0code commented Dec 16, 2024

Thank you for the library,
amazing stuff,
especially the limiting functionality

I seem to have issues with multiselect and checkbox input types.
these sorts of inputs usually have multiple values (those with square brackets after the field name e.g. interests[])

currently pechkin only provides the last value instead of returning an array of values.

I haven't tried adding fields to my FormData object with the alternative format (
e.g.
interests[0]="foo"
interests[1]="bar"

however I was under the impression the first method was a HTTP standard. (seems to be default browser behaviour)

I looked at the code and I think adding a check for the square brackets for field names somewhere in FieldPromise.ts could support this edge case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant