I am defining a [Joi](https://github.com/hapijs/joi/blob/master/API.md#anyvalidatevalue-options-callback) schema for an object with some fields for social profiles. The goal is to ensure that all of the fields are present and that at least one of them is a non-empty string, but to allow the others to be `null`.

Here is what I have so far:

```
const socialUrl = joi.string().min(1).alphanum().allow(null);
const schema = joi.object({
    facebook : socialUrl.required(),
    twitter  : socialUrl.required(),
    youtube  : socialUrl.required()
}).required()

```

This works great except that the following object is considered valid:

```
{
    facebook : null,
    twitter  : null,
    youtube  : null
}

```

Using [min()](https://github.com/hapijs/joi/blob/master/API.md#objectminlimit) and [or()](https://github.com/hapijs/joi/blob/master/API.md#objectorpeers) on the object doesn't help because the fields exist, they're just the wrong type.

It would be pretty trivial to do an extra loop myself afterwards and check for the specific case of all fields being `null`, but that is not ideal.

This is being used for [payload validation](https://hapijs.com/tutorials/validation#input) where it would be nice to know that the client understands the full schema, hence the desire that all of the fields be present. Maybe that is not worth it. I do get the sense that I could use some verbose [when()](https://github.com/hapijs/joi/blob/master/API.md#anywhenref-options) code to get the job done, but it seems like at that point I might as well just make my own loop. Hoping to be proven wrong!