$(document).ready(function() {
    
    $('form[name="inventory_vendor_form"]').validate({
        errorElement: "li",
        errorLabelContainer:'.error_container',
        validClass: 'valid',
        focusInvalid: true,
        rules: {
            companyName: {
                required: true
            },
            contactName: {
                required: true
            },
            contactNo: {
                required: true,
                already_exist_item_name: true
            },
            emailId: {
                required: true
            },
			status: {
                required: true
            }          
        },
        messages: {
            companyName: {
                required: 'Please enter Company Name!'
            },
            contactName: {
                required: 'Contact Person Name!'
            },
            contactNo: {
                required: 'Please enter Contact Phone No!'
            },
            emailId: {
                required: 'Please enter Email Id!'
            },
			status: {
                required: 'Please select Status!'
            }            
        }
    });
});

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