mozilla/openbadges-validator — pull request #8 by stenington (2013-08-19 21:26:02+00:00)
Title: Validate expected type

This piggybacks on https://github.com/mozilla/openbadges-validator/pull/7 to provide methods to validate only hosted assertions, hosted assertion URLs, or signed assertions to get slightly more complete error information about why the input is wrong.

Alternatively this could be done with an optional argument to the main `validate` function to specify which type you are attempting to pass.

The validator service will expose a control to make use of this so someone trying to validate a hosted assertion getting back the mesage that their signed assertion fails because the signature is wrong will have better recourse in figuring out what to do.