spumko/lout — pull request #64 by brock8503 (2014-05-19 07:00:02+00:00)
Title: Lout is failing on this particular nested Joi obj.

Here is a particular testcase where lout is failing on a rule object that is not an Array.

```
validate: {
payload: {
param1: Joi.array().includes( Joi.object( {
param2: Joi.array().includes( Joi.object( {
param3 : Joi.string() } ) ).optional()
} )
) }
}
}
```

Simple fix would be to add protection, but I don't think that is the ideal solution.

```
@ln 193 index.js
} else if (data.type === 'array' && param.rules) {

data.rules = {};

param.rules.forEach(function (rule) {

var capitalizedName = rule.name.charAt(0).toUpperCase() + rule.name.slice(1);

if (Array.isArray(params.rule)) {
data.rules[capitalizedName] = !Array.isArray(rule.arg) ? rule.arg : rule.arg.map(function (type) {

return internals.getParamsData(internals.describe(type));
});
}
});
```