Is there an way to accept only the fields that match a certain pattern?
- Dominant language
- JavaScript
- Stars
- 12.1k
- Forks
- 1.1k
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 21
Description
I am thinking something like this:
Suppose I have some Image fields like v1,v2,v3... Now the number of such fields cannot be determined in advance so it would be nice to have the multer.fields([]) funciton to also work like this:-
multer.fields([{name: /^v\d+$/, maxCount: 1}])
Contributor guide
Research direction
Start with the existing multer.fields entry point and its field-name validation behavior. Check how unknown field names and maxCount are currently handled, then determine the expected behavior for a regular-expression field name and add coverage for the requested pattern-matching case. Done means the API accepts fields matching the pattern while preserving existing field limits and behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100