$("#contact-form").validate({
    rules: {
                                contact_name: {
                                    required : true,
                                    email: {required: true, email: true }
                                    },
                                contact_company: "required",

                                },

                            messages:{
                                "contact_name":"",
                                "contact_company":""}
});

How to add a messagebox to jsvalidation that says "you sent message"

Member Avatar for LastMitch

How to add a messagebox to jsvalidation that says "you sent message"

You can try this:

// Validate the form 
$("#contact-form").validate({

// Custom validation messages
messages: { 
contact_name: "Please enter your full name.", 
contact_company: "Please enter you company name.", 
contact_message: "You sent message."},

submitHandler: function(form){

//Get the data from the form fields and format correctly
var name = $("#contact-form #contact_name").val();
var email= $("#contact-form #contact_company").val();
var message = $("#contact-form #contact_message").val();

document.forms["contact-form"].submit();
}
});
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.