Move validation into route generators.