Add a ValidationChain class

This chain acts as a processor and shortcuts (by throwing an exception) on
syntax errors.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>