I'm using the jQuery form validation script here: http://jzaefferer.github.com/jquery-validation/jquery.validate.js
Most of the methods I need (require field, maxlength, etc.) were already bundled into that script but there are two particularly crucial ones that I think I'll need to code myself.
One of the fields is for image submission. First, I need to to check that the image being submitted is actually linking directly do an image.
Further, I need it to confirm that the image being submitted is NOT is GIF image.
And lastly, (this may be tough) I need it to go into my MySQL database of images and confirm that that image has not been submitted previously (under the same url)
Please help me out if you can point me in the direction of making at least one of these happen! Thanks!
EDIT so this is useful to others who run into this problem:
The first one was solved by adding a method for verifying it was an image: Used code help from Dave and addMethod suggestion from Innerpeacer. Also look at bshack's answer from this question. Also, regex for images:
^(http\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(?:\/\S*)?(?:[a-zA-Z0-9_])+\.(?:jpg|jpeg|gif|png))$
Now on to the second part.