Here's a thought...
Why do you even need to validate this?
These codes are maintained externally to your company. All you should
really do is pull them down and store them.
It looks like ISBN offers an XML version of this data...