bronson/valid — Issue #3: Valid.optional() doesn't work on its own
Author: bronson
Created: 2011-10-11 00:11:59+00:00
State: open

It makes sense to declare something optional without actually defining what it is. This doesn't work, but it should:

Valid.json({
age: Valid.optional()
});

You need to pass a validator after optional: `Valid.optional().integer()` or something.

A workaround is `Valid.optional().nop()`.