Nodejs - Joi Check if string is in a given list : <p>I'm using <a href="https://github.com/hapijs/joi/blob/v10.1.0/API.md" rel="noreferrer">Joi package</a> for server side Validation.<br> I want to check if a given string is in a given list or if it is not in a given list.(define black list or white list for values)<br>
sth like an <em>"in"</em> or <em>"notIn"</em> function.how can I do that?</p>

<pre><code>var schema = Joi.object().keys({
    firstname: Joi.string().in(['a','b']),
    lastname : Joi.string().notIn(['c','d']),
});
</code></pre>
