Add validation/error reporting to VQB. Fix #147.

and document the validation implementation at the top of this file.