JQuery Validate Does Not Properly Work. What Am I doing wrong? Validation Problem

JQuery Validate Does Not Properly Work. What Am I doing wrong? Validation Problem

Hello,

I have been trying to solve this issue for a long time. Here are the highlights of my problem:

I have written code using C# which builds a JSON object and sends it back to the client-side via AJAX. Within the JSON object are validation rules, messages, and a dynamically built HTML form.

I append the form to a static DIV in the HTML page.

As I iterate through the JSON object, I dynamically add the rules to the individual, dynamically-built form elements.

The rules appear to be added fine. Sometimes a random key press will generate a rule message. However, 99.9% of the time nothing happens. Most times, the validation does not occur.

At this point i have not even defined what happens upon submit. I am trying to get validation to occur.