title: How to validate url params with react-router?
body: <p>I have a website that allows for urls of them form <code>/widgets/:id</code>. I have no more than 50 widgets, so <code>/widgets/51</code> is not a valid url. How do I go about rendering an error page when <code>id</code> is bigger than 50?</p>
  
  <p>Should I be validating the value of <code>id</code> in my Widget component? Or should I be validating it at the routes level? Also, I would prefer that the act of displaying an error page does not change the url. That is to say, if a user navigates to <code>/widgets/51</code> I would like to display an error page, but I would like the url that gets displayed in the browser to keep reading <code>/widgets/51</code>.</p>
  
  <p>Many thanks in advance!</p>