whatgoodisaroad/validity — Issue #4: distinct() does not calculate correct collision input fields
Author: posiczko
Created: 2011-10-25 05:05:16+00:00
State: open

Ooops, seems like google repo is no longer used. Moving [issue #61](http://code.google.com/p/validity/issues/detail?id=61) here.

### How to replicate issue

* Set up a table with a number of input fields in various columns, like http://pastie.org/2754304 or see attached [table.html] (http://code.google.com/p/validity/issues/attachmentText?id=61&aid=610000000&name=table.html&token=c4fe5dc5b362b3aa01770c854298966f)

* Run validation with:

$.validity.setup({ outputMode:"label" });
$.validity.start();
$('#group_table input:not([id*=member_Bounced]').require();
$('#group_table input:not([id*=member_Bounced]').match("email");
$('#group_table input:not([id*=member_Bounced]').distinct("Members must be unique.");
result = $.validity.end();

* What is the expected output? What do you see instead?
Colliding fields are ones with input of member1@example.com, however field with member4@example.com is chosen as conflicting one (see output [here](http://validity.googlecode.com/issues/attachment?aid=610000001&name=validity-distinct1.gif&token=2df36f736a2888537d643dde642d4b26&inline=1) and [here](http://validity.googlecode.com/issues/attachment?aid=610000002&name=validity-distinct2.gif&token=964f9d492a3da0d58536d6d71062b392&inline=1)). Could it be that id of input fields containing wonky brackets causes confusion?

* SW versions: Validity 1.2.0 with Jquery 1.6.4

Thank you for your help!

--p

PS

Thanks for this fantastic tool!