Support `regex` for arrayFormat
I have an issue with array params url:
1.
?categoryIds=1&categoryIds=2 => categoryIds=['1', '2'] : Right
2.
?categoryIds=1 => categoryIds='1' : Wrong
=> Expect: categoryIds=['1']
Could you add regex option for arrayFormat ? Or everyone have a solution for this.
Big thanks to you 🙇
What would a regex format do and how would it solve your problem?
@sindresorhus An Select/dropdown required array value (it was auto fill value from route params when reload). I can hand over 1 or 2 case by convert string to array, but with more select/dropdown, it's hard to control
I don't think regex is the proper solution for this. https://github.com/sindresorhus/query-string/issues/228#issuecomment-575197530 would be better.