I've this jquery code, loading a remote page with a parameter from an input text form
$(document).ready(function() {
$('form').submit(function() {
$('#result').load("/api.php", {
'url': $("input:text[name=url]").val()
});
});
});
I need to validate the input text, that is a url.
How can I use the Validate plugin to do validation before the submit?