clone - jQuery validate on cloned form fieldsets works but is ignored by .valid() method on the form element -


I'm sure this has surfaced many times, but before I'm at the end of my intellect with this problem Will try and problem will be descriptive as possible without the statement.

I am using jQuery valid plugin for form validation. All form rules and messages are retrieved via AJAX and subsequently initialised. All form validation works as a magic until I start cloning the fields within the form so that the user can get the ability to add additional entries.

The input field responds exactly, as they should change the value (error highlight and displaying the message etc.), but when I form on the form If I call the validid method, it ignores pre-cloned extra fields.

I've added the test rules after cloning the field, and then, the input field responds properly to the new rule, but it is stopped when you call it. Valid () on the form element.

I'll add the code snippet, anybody should be prepared to help me find a problem.

Thanks in advance! Edit:

Edit:

I've found that. Valid () method uses only as first field. Note that all the input names in the cloned field are similar to the original. For example, I have a field named ProductName in my original field and I clone it, I will now have two inputs in the form with the same name attribute .

Could it be that the verification of jQuery only cares about the first instance that it reaches and confirms? I have validated the post about jQuery not playing well with duplicate input names on forms but I believe it has been resolved.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -