﻿$(function(){
    $(".Form #Button1").click(function() {
        $("#Form1").validate({
            rules: {
                txtEmail: {email:true},
                txtPhone: {number:true,rangelength: [11,11]},
                txtConfirmEmail: { email:true,equalTo:"#txtEmailAddress" },
                txtConfirmPassword: { equalTo:"#txtPassword" }
            },
            messages: {
                txtName: "Please specify your name",
                txtEnquiry: "Please enter your enquiry",
                txtCompanyName: "Please enter your company name",
            txtEmail: {
                required: "Please enter your email address",
                email: "Please enter a valid email address"
            },
            txtPhone: {
                required: "Please enter your phone number",
                number: "Your number should only contain numbers (no spaces!)",
                rangelength: "Your number should contain 11 digits"
            },
                txtConfirmEmail: "Your email addresses don't match",
                txtConfirmPassword: "Your passwords don't match"
            }
        });
    });
});