I am trying to use the Jquery Validate Plugin and I was able to figure out how to use it on static fields.
My problem is on how to used it on my dynamic forms. I created a fiddle to discuss my problem. Hope you can have patience on reading this. The fiddle link is here
Now, here’s what I want to do, validate the Machine ID entered on each text box and make sure that it is unique. Say you enter ABCD-123 twice, the system should alert you that it is not unique.
Hoping somebody could lend me a hand on this. Thanks
first of all – put comments in your code while you write.
the error is here:
arrElementsis always empty, there is no element withmachineIDclassand your each doesn’t work. I refactored it http://jsfiddle.net/PaTJ4/
Your code could use some more fixes, it’s a bit too complicated for that task. But now it works.
good luck