I am having a little bit of trouble understanding how to implement jQuery Validation Plugin. With my form that is being submitted with Ajax:
$(document).delegate("'#submit-quote'", "submit", function(){
var quoteVal = $(this).find('[name="quote"]').val();
$.post("add.php", $(this).serialize(), function(data) {
var like = $('.quote-wrap span iframe');
$('.inner').prepend('<div id="' + data + ' " class="quote-wrap group">' + like + '<div class="quote"><p>' + quoteVal+ '</p></div></div>');
// console.log("success");
var id = parseInt(data);
console.log(id)
// some code after being successfully sent
});
After adding validation plugin, how would I set the defaults and make sure it's what I want the form to do?
It's just a textarea, that a user submits a simple quote. (text and numbers) and shouldn't submit anything else. Right now I can submit HTML, or anything else I like.
What do I need to do to make sure the user can't?
I have tried: