Multiple Forms with same field names result in wrong validation
If there are multiple forms on one page, and two different forms share a field with the same field name but different id (valid html, form names may be identical as long as they are not inside one form), validation messages appear at the first form within the DOM.
Validation should b based on id's, not field names.
The issue is not 100% reproduceable, I will try to figure out the conditions for that error to occur
I think i know how it happened, radio buttons and checkbox are sometimes based on name, because they are grouped, there is probably a $(form).find... missing somewhere
Hi, I have exactly the same problem. How can I resolve it?
Thanks in advance Bye Andrea
Do you use the latest version? (not the package)
I downloaded the zip file from link "Downloads" Is it not right? Where is the link for the latest version?
Thanks Bye
the lastest latest should come as a result of
git clone [email protected]:posabsolute/jQuery-Validation-Engine.git or by hitting the download button in the git project page
Sincerely,
I downloaded the latest version 2 weeks ago (Version 2.2), together with jquery 1.6.1 - with this version I had the issue. After a new download today + jQuery 1.6.2 everything works great again! I love it.
I downloaded the last version and I have JQuery 1.6.2 but doesn't work. It's very weird. Maybe the problem is that I have the same id, not only the same name. Is this a problem?
Thanks Bye
This will not work, because it is no valid html, the id must be unique in a document.
http://www.w3.org/TR/html4/struct/global.html#h-7.5.2
You can't have same id, happy its back working, i will create a new package soon, im afraid lots people do not take the edge version
Thanks. No problem for the ID, I changed them, but the problem is that with the same NAME it doesn't work. It works only with different NAME, but I can't use different NAME. Any idea?
Did you download the latest version? Attention: it still has the same version-number but some bugs where fixed! It helped me to resolve this issue.
Yes, I have it. I downloaded a lot of times... Could you attach here the latest version, please? So I can compare my version with the latest? Thanks
The last version is currently the same as the latest, package version 2.2.1
Hi, I have dowloaded the package 2.2.1 and the file JS is just alike the mine one. Sorry but I have no idea what I have to do. Bye Andrea
Do you have an online example which does not work?
Unfortunately no because the site is again under development.
I can copy here the HTML for the two form: `
``
`We use this link for the jquery library: https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js The problem there is also donwloading the version 1.6.2 from the jquery site.
Any help? Thanks Bye
Any help?
Your code works, so the error must be inside your html-head / init or inclusion of js. Please check with a js debugger, it should show you an error.
Your working code (unchanged, just added the html-wrap and include files / W3C valid): http://data.co-operation.de/test/jquery.validationEngine/
Thanks.
In the first form the problem doesn't exist. The form works. My problem is in the second form. In my site if I click submit button, for the second form, with the empty fields, the js controll appears in the first form.
In your link (thanks) if you click the submit button in the first form the js works (like in my site), instead if you click the submit button in the second form the js doesn't work.
Me and my js debugger have no idea.