title: how to validate fields in datatables
body: <p>I need to make a validation in datatables array.  </p>
  
  <pre><code>if typeoftransfer === '2' then return 'LL' 
  elseif typeoftransfer === '3' return 'SA'
  </code></pre>
  
  <p>I have been reading datatables documentation and didn'f found how  to do it.
  Here is my array code on the server processing:  </p>
  
  <pre><code>$columns = array(
    array( 'db' =&gt; '`reser`.`res_code`',      'dt' =&gt; 0, 'field' =&gt; 'res_code' ),
    array( 'db' =&gt; '`reser`.`transfer_id`',       'dt' =&gt; 1, 'field' =&gt; 'transfer_id' ),
    array( 'db' =&gt; '`reser`.`typeoftransfer`',    'dt' =&gt; 2, 'field' =&gt; 'typeoftransfer'),
    array( 'db' =&gt; '`reser`.`clavedest`',         'dt' =&gt; 3, 'field' =&gt; 'clavedest' ),
    array( 'db' =&gt; '`reser`.`arrivalhotel`',  'dt' =&gt; 4, 'field' =&gt; 'arrivalhotel' ),
    array( 'db' =&gt; '`clien`.`fullname`',      'dt' =&gt; 5, 'field' =&gt; 'fullname' ),
    array( 'db' =&gt; '`reser`.`peoplearrival`',     'dt' =&gt; 6, 'field' =&gt; 'peoplearrival' ),
    array( 'db' =&gt; '`reser`.`res_status`',        'dt' =&gt; 7, 'field' =&gt; 'res_status' ),
    array( 'db' =&gt; '`reser`.`typeoftransfer`',    'dt' =&gt; 8, 'field' =&gt; 'typeoftransfer', 
    data =&gt; function function( $d, $row ) {
              if ( typeoftransfer === '2' ) {
                  return "LL";
                }else{
                  return "SA";    
              }
          }
      ),
  );
  </code></pre>
  
  <p>Any idea ?, thanks in advance</p>