Hi guys,
And, at this moment, we're trying to add support to validations(
https://github.com/natesilva/jayschema). I was thinking to use any kind of hook, such as
beforeValidate or
afterValidate, to call a custom class responsible to validate the data sent.
Taking a look at the Loopback internals, I could return an instance of ValidationError:
callback(new ValidationError(obj), obj);
so, I don't need to handle the output. Loopback does it already for me.
But, it seems I don't have access to any callback inside the hooks. What do you suggest us to do in this scenario?
thanks a lot,
Alberto
--
Alberto Leal
@albertoleal