Created
November 26, 2012 07:46
-
-
Save jacobh/4147072 to your computer and use it in GitHub Desktop.
jQuery validator plugin modification to allow for multiple inputs with the same name, ported to CS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.validator::checkForm = -> | |
@prepareForm() | |
elements = (@currentElements = @elements()) | |
for element in elements | |
$elem = $ "[name='#{element.name}']:not([disabled])" | |
if $elem.length > 1 | |
for sub_element in $elem | |
@check sub_element | |
else | |
@check element | |
@valid() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment