title: Datamapper validation with form validation - Codeigniter
body: <p>I'm using this datamapper <a href="http://datamapper.wanwizard.eu" rel="nofollow">http://datamapper.wanwizard.eu</a></p>
  
  <p>problem is datamapper have validation methods similar with codeigniter form validation.but not as same.</p>
  
  <p>An example, a model admins model validation array:</p>
  
  <pre><code>public $validation = array(
          'username' =&gt; array(
          'rules' =&gt; array('unique', 'required', 'trim', 'max_length' =&gt; 60, 'min_length' =&gt; 3),
          'label' =&gt; 'User'
      ),
          'password' =&gt; array(
          'rules' =&gt; array('required', 'trim', 'encrypt', 'min_length' =&gt; 6),
          'label' =&gt; 'Password'
      )
  );
  </code></pre>
  
  <p>but form validation array must be like that:</p>
  
  <pre><code>public $form_validation = array(
      array(
          'field' =&gt; 'username',
          'label' =&gt; 'User',
          'rules' =&gt; 'unique|required|trim|max_length[60]|min_length[3]'
      ),
      array(
          'field' =&gt; 'password',
          'label' =&gt; 'Password',
          'rules' =&gt; 'required|trim|encrypt|min_length[6]'
      )
  );
  </code></pre>
  
  <p>I don't want to make two manual validation for new admin adding (first form validation, after datamapper validation). I think there is a way to make this with just one manual validation.</p>
  
  <p>sorry my bad English, I hope you understand. Thanks in advance.</p>