title: how to implement input filter and validation
body: <p>I am a newbie in zendframework. I am using zendframework version 2.</p>
  
  <p>I have a ClientForm class which is inheriting from Zend\Form\Form.</p>
  
  <pre><code>class Client extends Form
  {
      public function __construct($name = null, $options = array())
      {
          if (null == $name) $name = 'ClientFrom';
          parent::__construct($name, $options);
  
          $this-&gt;add(array(
              'name' =&gt; 'clientName',
              'type' =&gt; 'Text'
          ));
  
          $this-&gt;add(array(
              'name' =&gt; 'address1',
              'type' =&gt; 'Text'
          ));
      }
  }
  </code></pre>
  
  <p>I need to implement validation and filtering for the above form. </p>
  
  <p><strong>Rules for Validation</strong></p>
  
  <pre><code>'clientName' =&gt; required, min = 3, max = 25
  </code></pre>
  
  <p><strong>Rules for Filter</strong></p>
  
  <pre><code>'clientName' =&gt; [a-zA-Z0-9_ ]
  </code></pre>
  
  <p><strong>Questions</strong> </p>
  
  <ol>
  <li>Can I implement this rules and filter in the same class as Form (without creating a new input filter class)</li>
  <li>Please show me example on how to implement above rules on my above class.</li>
  </ol>
  
  <p>Thank you.</p>