title: Zend framework 2 routing required query parameters not working
body: <p>I'm working on zf2 to make one of my routes only accessible when a query string parameter is passed. Otherwise, it will not. I've added a filter on the route section but when accessing the page without the query parameter, it is still going thru.</p>
  
  <pre><code>'router' =&gt; array(
      'routes' =&gt; array(
          'show_post' =&gt; array(
              'type' =&gt; 'segment',
              'options' =&gt; array(
                  'route' =&gt; '[/]show/post/:filter',
                  'constraints' =&gt; array(
                      'filter' =&gt; '[a-zA-Z0-9-.]*',
                  ),
                  'defaults' =&gt; array(
                      'controller' =&gt; 'blog_controller',
                      'action' =&gt; 'show'
                  )
              ),
          ),
      ),
  ),
  </code></pre>
  
  <p><code>http://example.com/show/post/?postId=1235</code> = This should work</p>
  
  <p><code>http://example.com/show/post?postId=1235</code> = This should work</p>
  
  <p><code>http://example.com/show/post/</code> = This should not work</p>
  
  <p><code>http://example.com/show/post</code> = This should not work</p>