I am working on an api that should allow multiple params but for three of them I would like to allow only one of them. It easier with values for each key but I am wondering if Joi allows it too or I should add extra validation logic in my server.
In short, for keys a
, b
or c
I want to fail any request that has more than one of the three, so:
http://myapi.com/?a=value
is a valid request.http://myapi.com/?b=value&c=value2
is invalid.
Thanks!