Added route validation when making custom routes for modules.