Remove foreach in route validation