$(document).ready(function() {
    $('form[name="ubayam_form"]').validate({
        errorElement: "li",
        errorLabelContainer:'.error_container',
        validClass: 'valid',
        focusInvalid: true,
        rules: {
            name: {
                required: true
            },
            sanctum_name: {
                required: true
            },
            ubayam_name: {
                required: true
            },
            no_of_yrs: {
                required: true
            },
            ubayam_amount: {
                required: true
            },
            phone_no: {
                required: true
            },
            email: {
                //required: true,
                email: true
            }
        },
        messages: {
            name: {
                required: 'Please enter Ubayakarar\'s Name!'
            },
            sanctum_name: {
                required: 'Please enter Sanctum Name!'
            },
            ubayam_name: {
                required: 'Please enter Ubayam Name!'
            },
            no_of_yrs: {
                required: 'Please enter No of Years!'
            },
            ubayam_amount: {
                required: 'Please enter Ubayam Amount!'
            },
            phone_no: {
                required: 'Please enter Contact No!'
            },
            email: {
                //required: 'Please enter Email!',
                email: 'Please enter Valid Email!'
            }
        }
      });
});

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