arb / celebrate

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

Custom Joi #57

Closed eth0lo closed 6 years ago

eth0lo commented 6 years ago

The issue I am having with celebrate is:

I was wondering how I could use an extended Joi object with celetabre, the idea is that I could have custom validations.

arb commented 6 years ago

There is a test for this here. Is that what you're trying to do?

eth0lo commented 6 years ago

Exactly that, but I was confused, by the recommendation of using the included Joi

arb commented 6 years ago

You should use the bundled version of joi, and then extend it, just like it's done in the unit tests. I'm unclear what the confusion is.

cjihrig commented 6 years ago

The recommendation to use the bundled joi is to make sure there are not any compatibility issues. You are free to use whatever version of joi you want, and it should just work.

eth0lo commented 6 years ago

Perfect, thank you very much, feel free to close it