sofish/validator.js — pull request #26 by ChrisYip (2013-06-17 17:13:32+00:00)
Title: Support multiple forms in one function call

Example:

In current version, you have to invoke `validator` twice:

$('form').each(function(){
$(this).validate(options)
})
// or
$('#subscribe-discount).validator(options)
$('#subscribe-new-products).validator(options)

If you do this: `$('form').validate(options)`, will fails silently.

This patch makes it works more like jQuery: treat itself as an array, and return itself.