Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

Sequences stripping out duplicates #73

Closed
JoeSimmonds opened this issue Dec 20, 2016 · 2 comments
Closed

Sequences stripping out duplicates #73

JoeSimmonds opened this issue Dec 20, 2016 · 2 comments

Comments

@JoeSimmonds
Copy link
Contributor

I recently ran into a problem validating a form containing a list of items. If the user entered duplicate values in the list then the validations removed the duplicates.

I think I've tracked the problem down to the toMap call in the spm function here https://github.com/jto/validation/blob/master/validation-form/src/main/scala/Writes.scala#L42 which is removing duplicate keys from the map.

I have a solution for our project which involves our own version of the spm function.

Is my interpretation of this as a problem correct? If so I'd be happy to prepare a PR with our fix and some tests if that would help.

thanks
Joe

@OlivierBlanvillain
Copy link
Collaborator

Is my interpretation of this as a problem correct?

Yes, this looks like a bug to me. PR welcome!

@jto
Copy link
Owner

jto commented Dec 20, 2016

Definitely a bug. PR are indeed welcome :)

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

No branches or pull requests

3 participants