title_body: How can I validate an epub file? How can I formally validate the structure of an .epub file and check it for errors?
upvoted_answer: IDPF, the consortium that promotes the .epub standard, has released a tool named epubcheck.
  It is available both via an online web-app here, or as a stand-alone program here.
  
  There is also another tool called FlightCrew, available here; this is also integrated within Sigil, a full fledged epub editor (available here).
  
  All these tools are free and cross-platform.