Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7531007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:04:09+00:00 2026-05-30T05:04:09+00:00

I am creating a JavaScript / ajax comment form using the jQuery Validation Plugin.

  • 0

I am creating a JavaScript / ajax comment form using the jQuery Validation Plugin.

How do I customize the messages that are sent to the user? Currently, the form returns heuristic type: NAME_FULL server type: NO_SERVER_DATA field signature: 3489289364 form signature: 13828296746807249018 experiment id:"" when a field is left blank.

I just want it to say “Please enter your name.” Here is the JavaScript that controls the plugin and the form:

<script type="text/javascript" src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script>

$(document).ready(function(){
    $("#commentForm").submit(function(){
        if($("#commentForm").validate()){
            $.ajax({
                type: 'POST',
                url: 'process.php',
                data: $(this).serialize(),
                success: function(returnedData){
                $('#commentForm').append(returnedData);
                }
            });
        }
        return false;
    });
});

 <form class="cmxform" id="commentForm" method="POST" action="">
 <fieldset>
   <p>
     <label for="cname">Name</label>
     input id="cname" name="name" size="25" class="required" minlength="2" />
   </p>
   <p>
     <label for="cemail">E-Mail</label>
     <input id="cemail" name="email" size="25"  class="required email" />
   </p>
   <p>
     <label for="curl">URL</label>
     <input id="curl" name="url" size="25"  class="url" value="" />
   </p>
   <p>
     <label for="ccomment">Your comment</label>
     <textarea id="ccomment" name="comment" cols="22"  class="required"></textarea>
   </p>
   <p>
     <input class="submit" type="submit" value="Submit"/>
   </p>

And the php is pretty straightforward:

$email = $_POST['email'];

if(!filter_var($email, FILTER_VALIDATE_EMAIL)){ 

print "E-mail is correct";

$to      = 'asdfdsafasdfsda@gmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com';

mail($to, $subject, $message, $headers);

} else {
print "E-mail is not correct";
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T05:04:10+00:00Added an answer on May 30, 2026 at 5:04 am
    $(document).ready(function() {
        $.extend(jQuery.validator.messages, {
            required: "This field is required.",
            remote: "Please fix this field.",
            email: "Please enter a valid email address.",
            url: "Please enter a valid URL.",
            date: "Please enter a valid date.",
            dateISO: "Please enter a valid date (ISO).",
            number: "Please enter a valid number.",
            digits: "Please enter only digits.",
            creditcard: "Please enter a valid credit card number.",
            equalTo: "Please enter the same value again.",
            accept: "Please enter a value with a valid extension.",
            maxlength: $.validator.format("Please enter no more than {0} characters."),
            minlength: $.validator.format("Please enter at least {0} characters."),
            rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
            range: $.validator.format("Please enter a value between {0} and {1}."),
            max: $.validator.format("Please enter a value less than or equal to {0}."),
            min: $.validator.format("Please enter a value greater than or equal to {0}.")
        });
    });
    

    EDIT:

    Proper implementation of Validation Plugin…

    $(document).ready(function() {
    
        $('#commentForm').validate({
            submitHandler: function(form) {
                $.ajax({
                    type: 'POST',
                    url: 'process.php',
                    data: $(this).serialize(),
                    success: function(returnedData) {
                        $(this).append(returnedData);
                    }
                });         
                return false;
            }
        });
    
    });
    

    Validation Plugin Documentation

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a comment form based on the jquery validation plugin (http://docs.jquery.com/Plugins/Validation). I
I am trying to create a car make/model form using Javascript or AJAX, problem
I am creating a JavaScript class. Some of the methods contain AJAX calls using
I'm creating a web application which loads tabs using AJAX. My problem is that
How is it that jQuery can do $(#foo).addClass(bar) and $.ajax() ? I'm creating a
Im using rails 3.1, and I am creating a search form with ajax, I
While creating JavaScript with ASP.NET MVC I noticed several scope warnings and realized that
I'm creating a javascript method that populates lists depending on a radio button selected
I'm creating my own JavaScript Array-like object and I have methods that call closures.
I am creating a large table dynamically using Javascript. I have realised the time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.