title: ZF2 two elements with one input filter
body: <p>I have a simple zend framework 2 form and input filter.  I'm trying to figure out how to validate that the expiration year and month of a credit card to not fall into the past.  How can you have one validation rule that requires two fields to validate correclty?</p>
  
  <p>Input filter:</p>
  
  <pre><code>&lt;?php
  namespace Account\Form;
  
  use Zend\InputFilter\InputFilter;
  use Zend\Validator\CreditCard;
  use Zend\Validator\Date;
  
  class SuspendedPaymentFilter extends InputFilter
  {
      public function __construct()
      {
  
  
      $this-&gt;add(array(
          'name'       =&gt; 'expiration_month',
          'required'   =&gt; true,
          'filters' =&gt; array(
              array('name' =&gt; 'StripTags'),
              array('name' =&gt; 'StringTrim'),
          ),
          'validators' =&gt; array(
             array('name' =&gt; 'not_empty'),
             array(
                  'name' =&gt; 'date',
                  'options' =&gt; array(
                      'locale' =&gt; 'en',
                      'format' =&gt; 'm',
                  ),
              ),
           ),
      ));
  
      $this-&gt;add(array(
          'name'       =&gt; 'expiration_year',
          'required'   =&gt; true,
          'filters' =&gt; array(
              array('name' =&gt; 'StripTags'),
              array('name' =&gt; 'StringTrim'),
          ),
          'validators' =&gt; array(
              array('name' =&gt; 'not_empty'),
              array(
                  'name' =&gt; 'date',
                  'options' =&gt; array(
                      'locale' =&gt; 'en',
                      'format' =&gt; 'Y',
                  ),
              ),
           ),
      ));
  
  
  }
  }
  </code></pre>
  
  <p>Form:</p>
  
  <pre><code>&lt;?php
  namespace Account\Form;
  
  use Zend\Form\Form;
  use Tools\Data\DateTime;
  
  class PaymentForm extends Form
  {
  public function __construct($name = null)
  {
      parent::__construct('Payment');
      $this-&gt;setAttribute('method', 'post');
      $this-&gt;setAttribute('enctype','multipart/form-data');
  
  
  
      $this-&gt;add(array(
          'type'  =&gt; 'Zend\Form\Element\Select',
          'name' =&gt; 'expiration_month',
          'attributes' =&gt; array(
              'required' =&gt; 'required',
              'class' =&gt; 'form-control',
          ),
          'options' =&gt; array(
              'label' =&gt; 'Expiration Month',
              'value_options' =&gt; array(
                  '01' =&gt; 'January',
                  '02' =&gt; 'February',
                  '03' =&gt; 'March',
                  '04' =&gt; 'April',
                  '05' =&gt; 'May',
                  '06' =&gt; 'June',
                  '07' =&gt; 'July',
                  '08' =&gt; 'August',
                  '09' =&gt; 'September',
                  '10' =&gt; 'October',
                  '11' =&gt; 'November',
                  '12' =&gt; 'December',
              ),
  
          ),
  
      ));
  
     $this-&gt;add(array(
          'type'  =&gt; 'Zend\Form\Element\Select',
          'name' =&gt; 'expiration_year',
          'attributes' =&gt; array(
              'required' =&gt; 'required',
              'class' =&gt; 'form-control',
          ),
          'options' =&gt; array(
              'label' =&gt; 'Expiration Year',
              'value_options' =&gt;  DateTime::returnXYears(10),
          ),
  
      ));
  
  }
  }
  </code></pre>