There's this great epubcheck tool over at http://code.google.com/p/epubcheck/
but it comes as a java application or for a web server. I wanted a drag&drop application for Mac OS X.
So I wrapped the java app in an AppleScript. Here it is. Just drag & drop ePub files onto the AppleScript, and the script will run epubcheck and report back on errors. If there are no errors, you'll also get a small dialog saying so.
I beleive it will work on Mac OS X 10.4 and later.
[EDIT] Updated to use epubcheck 1.0.5
[EDIT] Updated to make the error dialog a bit wider, and to save an error report when there are errors. The error report will be in the same folder as the ePub and with the same name, but with '.txt' appended.
[EDIT] Updated to use epubcheck 1.1. I've left the 1.05 version here in case anyone still needs it.
[EDIT] Updated to use epubcheck 1.2. I've left the previous versions, even though I can't think why anyone would want to use them.
[EDIT] Updated to use epubcheck 3.0b5. Now has a pretty icon and also a translation into French. Thanks to Diegnum for the French translation. Any error in the French will be mine, as I adapted their text slightly. Please do report any errors in the dialogs. Further translations will be added if there is demand, and someone supplies me with the translated text!
[EDIT] Updated to use epubcheck 3.0RC1.
[EDIT] Update to use epubcheck 3.0.