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

Generated type for MultiCheckbox wrong #30

Closed
kynx opened this issue Feb 26, 2024 · 0 comments · Fixed by #33
Closed

Generated type for MultiCheckbox wrong #30

kynx opened this issue Feb 26, 2024 · 0 comments · Fixed by #33
Labels
bug Something isn't working

Comments

@kynx
Copy link
Owner

kynx commented Feb 26, 2024

I'm getting something like:

''|'0'|'1'|'2'|null

It should be:

array<''|'0'|'1'|'2'|null>

Actually what is submitted is an array. I think this is down to the Explode validator - it can accept a comma separated list, explode it and validate the contents, but this one is configured with a null delimiter. The ExplodeVisitor would do the right thing if it knew the incoming data was already an array, but right now we have no way of telling it that.

One way to tackle that would be to convert it's Input to an ArrayInput before we process it, a bit like we do for single-element collections. But the logic there is already getting pretty soupy - we probably need it separate it out into some kind of ElementVisitorInterface.

@kynx kynx added the bug Something isn't working label Feb 26, 2024
@kynx kynx closed this as completed in #33 Feb 28, 2024
kynx pushed a commit that referenced this issue Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant