Question

I am trying to use jQuery-Validation-Engine on my form. I've downloaded the files, looked at the local demo, and tried following the directions to get my form to work. However, in looking back at the site, I see this:

  1. Include the script jquery.validationEngine.closure.js in your page

I'm not seeing any such file in the demo's /js/ file.

My file structure contains: index.html file (with the form)

  1. jQuery-Validation-Engine (subfolder - contains the jQuery Validation files)
  2. jQuery-Validation-Engine/css (subfolder)
  3. jQuery-Validation-Engine/js (subfolder)

I put calls to the validationEngine.jquery.css and template.css stylesheets; and also to the jquery.validationEngine-en.js and jquery.validationEngine.js files. I also included the script from lines 14-32 of the demoValidators.html demo page.

I've added the id="formID" attribute to my form tag, and added the class="validate[required]" attribute to the first field in the form. But when I reload the page and place my cursor in that first form field, then remove it, I don't see any error styling like I'd expect: not the red outline, not the error message-bubble.

What else should I check to see if the script is acting on the form? And where is the jquery.validationEngine.closure.js script, mentioned in Step 2 of the instructions for using this validator?

Was it helpful?

Solution

From the source of one of the demos:

<link rel="stylesheet" href="../css/validationEngine.jquery.css" type="text/css"/>
<link rel="stylesheet" href="../css/template.css" type="text/css"/>
<script src="../js/jquery-1.6.min.js"></script>
<script src="../js/languages/jquery.validationEngine-en.js"></script>
<script src="../js/jquery.validationEngine.js"></script>
<script>
    jQuery(document).ready(function(){
        jQuery("#formID").validationEngine();
    });
</script>

It looks like the reference to "jquery.validationEngine.closure.js" is an error in their documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top