Here's an article about what the wav format spec looks like:
Should be able to write a little script of some kind to check out the headers and make sure they look OK.
Here's a small utility that may suit your need. It checks the file, outputs some information on the file, and exits. The return code is 0 if successful, nonzero if there's a problem with the file.
It is written in Python and depends on the Python wave library. You can extract the .py file from the zip and examine/run independently, or use the compiled exe along with the support files included.
Seems to work OK for e.g. files output by lame --decode, and catches when I truncate a WAV (checks to make sure the file size is sane).
There is no way to determine if the PCM data has been corrupted without e.g. external checksums, etc.
Added a bit better error checking. Compiled exe version freaks out when wavcheck.py is in the same folder, so I stuck it in a subfolder (/src). Lol. Updated link above to new file.
I took a look at shntool as suggested by @boehj -- looks like good software for checking WAV files, and it has nice detailed output. Its output could be trivially parsed or its source code modified to allow for an all-OK exit status in 'info' and/or 'len' mode. As it stands, it has exit code 0 even when it is reporting problems with the file.
Homepage for shntool: http://shnutils.freeshell.org/shntool/
Update: Since everything in this post was stale for years, I linked to a different article about the wav format, and uploaded the code I wrote and compiled software to github, and updated the link to point to it. Tested the software in Win10 and it does seem to still work on basic LPCM wav files. Doesn't seem like shntool exists at the original link anymore, so I fixed that to point somewhere too, but couldn't tell for sure if it's definitive.