jQuery Validation Problems -


I'm trying to validate 4 areas. Verification in the last two behaves correctly, but the first two do not work. If I do not enter anything - the form will still be valid.

S + / g, ""); Return to this. Option (element). Phone_number.length & gt; 9 & amp; Amp; Amp; phone number. Milan (/ ^ (1 -?)? (\ [[2- 9] \ d {2} \) | [2- 9] \ d {2}) -? [2- 9] \ d {2} -? \ D {4} $ /);}, "Not a valid phone number"); Validate $ ("# Advertise.post") ({Rules: {advRetailerName: {expected: true}, advName: {required: true}, adphone: {required: true, phone: true}, advEmail: {REQUIRED: true , {Email: true}}, the message: {advRetailerName: {Required: "This is required."}, AdvName: {Required: "This is required."}, Adophone: {Required: "This is required.", Phone: This is an invalid phone number. "}, AdvEmail: {Required:" This is required ", email:" This is an invalid email "}}});

Here is the real form:

  form action = "php / advertise.post.php" method = "post" id = "advertisepost" Gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; Td> Retailer name & lt; / Td> & Lt; Td> & Lt; Input type = "text" id = "advRetailerName" name = "advRetailerName" /> & lt; Br / & gt; & Lt; = "Error" for label = "advRetailerName" class = "true" & gt; & Lt; / Labels & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> Your name & lt; / Td> & Lt; Td> & Lt; Input type = "text" id = "advName" name = "advName" /> & Lt; Br / & gt; & Lt; Label = "error" for class = "advName" generated = "true" & gt; & Lt; / Labels & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> Phone number & lt; / Td> & Lt; Td> & Lt; Input type = "text" id = "advPhone" name = "advPhone" /> & Lt; Br / & gt; & Lt; = "Error" for label = "advPhone" class = "true" & gt; & Lt; / Labels & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> Email address & lt; / Td> & Lt; Td> & Lt; Input type = "text" id = "advEmail" name = "advEmail" /> & lt; Br / & gt; & Lt; = "Error" for label = "advEmail" class = generated = "true" & gt; & Lt; / Labels & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt; & Lt; Input type = "button" value = "submit" id = "advsubmit" /> & Lt; / Form & gt;   

I have made half a dozen forms in such a way without losslessness, but I do not know why there is problem in the first two areas due to not following the rules of verification. Any help?

I have only used this plugin briefly, which I can remember, for empty areas The verifier has to add the "required" class to its input elements.

Comments