Adding validation_error() that asserts 400 and JSON content-type