Reworked a little. Validation now defined in config.