Allows to validate divs with name attribute

It allows to validate div with a name attribute. Usually these are
content editable divs. It changes all the element.name calls to
$(element).attr('name') and element.form to a function that gets the
parent form. It can be optimized a lot, but I prefered to change as
little code as possible form original one.