Is there a way in your routes file to check and validate URL parameters. I am NOT talking about restful ‘/controller/action/:id’ params, but ‘controller/action?param1=x¶m2=y¶m3=z’. I need to be able to validate each parameter and require them.
Share
Yes, you can. For example to check that param1 exists and is not blank you would do the following:
You can also scope these constraints to apply them to multiple routes: