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

Add support for array-like fields #340

Closed
wants to merge 2 commits into from

Conversation

samholmes
Copy link

This is a very basic feature to add, and I know it's a "feature", but allow me to state my case.

One may not want this feature (I can argue that most would, but that's just my opinion), and currently when someone wants this feature, they must write their own parse function. However, with this feature, one could write their own parse function if they don't want this feature (or they could just not enable it via the multiples option). So, either way, the default parse method could (and should IMO) include this feature; if someone doesn't want this feature they can write their own parse function.

Besides, why would someone ever complain about this feature when it's so unobtrusive? It would only if someone wanted their name had the [] suffix at the end for whatever reason (maybe they like boxes or something).

I see no argument against this feature, so let's solve this issue: #33

Added basic support for array-like fields when the 'multiples' option is enabled and field is suffixed with "[]".
@felixge
Copy link
Collaborator

felixge commented Jan 11, 2017

#412

@tunnckoCore
Copy link
Member

@samholmes sorry, I just merged #380. :)

tunnckoCore added a commit that referenced this pull request Nov 28, 2019
preserves backward compat

related to #380 #340
tunnckoCore added a commit that referenced this pull request Nov 28, 2019
@tunnckoCore
Copy link
Member

Please try npm install formidable@canary - preview of v2. The API is almost the same, check the docs or open new issue if there's some problem.

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

Successfully merging this pull request may close these issues.

None yet

3 participants