jQuery form validation remote: function

jQuery form validation remote: function

I was wondering how to get the remote: function to work on my jQuery form?
Here is the jQuery I am using to validate the form.
  1. $("#form").validate({
  2. success: function(label) {
  3. label.addClass("valid").text("Ok!")
  4. }
  5. })
What I am trying to do is store the email addresses that are sent to a file that I have named "emails.txt" and then I want the form to check that file when the form is submitted, and if the email already exists, I want it to display an error saying so.

If that makes sense, I would love some help with this!

Thanks, Josh.