dded two callbacks onBeautified and onValidationFailed to support
modifying the beautified output and display custom errors on failure.
Also use more specific version of dependencies.