Validate not actually validating...

Validate not actually validating...

I have a simple form, a few hidden fields, a few text imputs and two buttons.

I try the following to validate the form.

  1.    $(document).ready(function(){
            $("#registrationForm").validate({
                rules: {
                        student_email: {
                                required:true,
                                email:true
                        },
                        manager_email: "required"
                },
                messages: {
                        student_email: "Please enter a valid email address.",
                        manager_email: "Please enter a valid email address."
                }
            });
        });













There is no results if I leave a required field blank or if I malform the email address.  I can add the following and get expected results:
  1. submitHandler: function() { alert("submitted!"); }
My form is as follows:

  1. <form name="registrationForm" id="registrationForm" action="#application.base_url#course_register_receipt_ilt.cfm" method="post">
        <input type="hidden" name="course_id" id="course_id" value="#url.course_id#" /><!--- Course ID --->
        <input type="hidden" name="session_id" id="session_id" value="#url.session_id#" /><!--- Session ID --->
        <input type="hidden" name="waitlist" id="waitlist" value="#url.waitlist#" /><!--- Action (Register|Waitlist) --->
       
        <span class="g_h3">1. Enter Your Email</span><br />
        &nbsp; &nbsp; &nbsp;<input type="text" name="student_email" id="student_email" class="ilt_input_field" size="30" value="#variables.objStudentInfo.StudentEmail#" />
        <br /><br />
       
        <span class="g_h3">2. Enter Your Manager's Name</span><br />
        &nbsp; &nbsp; &nbsp;<input type="text" name="manager_name" id="manager_name" class="ilt_input_field" size="30" value="#variables.objStudentInfo.ManagerName#" />
        <br /><br />
       
        <span class="g_h3">3. Enter Your Manager's Email</span><br />
        &nbsp; &nbsp; &nbsp;<input type="text" name="manager_email" id="manager_email" class="ilt_input_field" size="30" value="#variables.objStudentInfo.ManagerEmail#" />
        <br /><br />
       
        <a href="javascript:history.go(-1)"><img src="images/site_layout/ilt/cancel_btn.jpg" border="0"></a>
        &nbsp;
        <cfif url.waitlist eq 1>
        <input type="image" src="images/site_layout/ilt/waitlist_btn.jpg">
        <cfelse>
        <input type="image" src="images/site_layout/ilt/register_btn.jpg">
        </cfif>     
    </form>


























So, my question is, does anybody see any problems with this code?

Thanks in advance for any assistance.

Jeff











    • Topic Participants

    • jeff