Asynchronous validation, check if item is already present in the database
Hi guys! I love hapi and I think you have done a great job! I know Joi validate the schema of the data coming in, however I was wondering if it is possible to pass it some asynchronous function in order to check if that item is already been created.
My use case would be to check if the email field is already been used or not.
I'm sorry if this question has been already asked, and if Joi is not right place to do that which is the best way to do that.
Thanks for the great work done!
It's already being discussed in #577 but it'll take time. In the meantime I encourage you to use a function as hapi validation, internally using joi for what it can do and manually for the remaining parts.