$(document).ready(function() {
    $('form[name="temple_form"]').validate({
        errorElement: "li",
        errorLabelContainer:'.error_container',
        validClass: 'valid',
        focusInvalid: true,
        rules: {
            name: {
                required: true
            },
            chairman: {
                required: true
            },
            blk: {
                required: true
            },
            unit_no: {
                required: true
            },
            unit_no: {
                required: true
            },
            phone_no: {
                required: true
            },
            email: {
                //required: true,
                email: true
            }

        },
        messages: {
            name: {
                required: 'Please enter Name!'
            },
            chairman: {
                required: 'Please enter Chairman / President Name!'
            },
            blk: {
                required: 'Please enter BLK!'
            },
            unit_no: {
                required: 'Please enter Unit No!'
            },
            phone_no: {
                required: 'Please enter Contact No!'
            },
            email: {
                //required: 'Please enter Email!',
                email: 'Please enter Valid Email!'
            }
        }
      });
});

function goBack() {
    window.history.back();
}