$(document).ready(function() {
    $('form[name="donor_form"]').validate({
        errorElement: "li",
        errorLabelContainer:'.error_container',
        validClass: 'valid',
        focusInvalid: true,
        rules: {
            name: {
                required: true
            },
            donation_for: {
                required: true
            },
            phone_no: {
                required: true
            },
            email: {
                //required: true,
                email: true
            }
        },
        messages: {
            name: {
                required: 'Please enter Donor\'s Name!'
            },
            donation_for: {
                required: 'Please enter Donation For!'
            },
            phone_no: {
                required: 'Please enter Contact No!'
            },
            email: {
                //required: 'Please enter Email!',
                email: 'Please enter Valid Email!'
            }
        }
      });
});

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