arb / celebrate

A joi validation middleware for Express.
MIT License
1.34k stars 65 forks source link

any.external async support #205

Closed basaran closed 3 years ago

basaran commented 3 years ago

Hello,

Does celebrate support async validation from joi any.external?

https://joi.dev/api/?v=17.3.0#anyexternalmethod-description

Thank you,

arb commented 3 years ago

It supports extend per the tests here. I would suspect any.external would also work. Also, all validations happen async now when I updated to a newer version of Joi.

basaran commented 3 years ago

Thank you, I will test it over the weekend and update it here. I ran into an issue with another library where the error thrown within the any.external was not caught accordingly so I figured I should ask first. Much appreciated.