Cannot customize the error message

Cannot customize the error message

Hi,

Using Jquery Validation plugin ,

I am trying to put a custom message but it doesn't work, It takes the default message "This field is required".

Here is my Code:


$(function() {


$("#MainContainer").wrap("<form id='myForm'>");

    $("#myForm").validate({
        rules: {
          EmployeeName: "required"
        
        },
        messages: {
          EmployeeName: "Please enter EmployeeName"
        
        },
       
    });
 
   
   
   
   
});