Jquery form is not validating with parse database

Hi, I am having an issue with getting this form to check that a valid email address has been entered and then if it has to post this to a Parse database. I have removed the API key for Parse but apart from that this is what I entered.

Thanks so much in advance.

            rules: {
                email: {
                    required: true,
                    email: true
            messages: {
                email: "Please enter a valid email address"

        $(".cancel").click(function() {
    var parseAPPID = "";
	var parseJSID = "";
	Parse.initialize(parseAPPID, parseJSID);
	var CommentObject = Parse.Object.extend("CommentObject");
      	$("#emailform").on("submit", function(e) {

		console.log("Handling the submit");
		//add error handling here
		//gather the form data

		var data = {};
		data.email = $("#email").val();

               var comment = new CommentObject();
		comment.save(data, {
			success:function() {
				alert("Thanks for filling the form!");
			error:function(e) {

Hi ben_o,

What exactly is the problem you’re having, the form isn’t validating before you try to save it to Parse? Also, are there any errors or messages?

Hi fretburner, there aren’t any error messages, it just doesn’t save the input to parse which it was doing fine before the validation script was added. Sorry I can’t add any more detail as i really don’t understand why it won’t work. Thanks for any advice

Aren’t you getting any console messages to indicate that at least the submit event is firing, or anything like that?

I set up a jsfiddle with your code, and the whole thing works fine for me - it even saved to Parse using a free account that I created.