/**
  * Validates all modified columns of given ProcessUser object.
  * If parameter $columns is either a single column name or an array of column names
  * than only those columns are validated.
  *
  * NOTICE: This does not apply to primary or foreign keys for now.
  *
  * @param      ProcessUser $obj The object to validate.
  * @param      mixed $cols Column name or array of column names.
  *
  * @return     mixed TRUE if all columns are valid or the error message of the first invalid column.
  */
 public static function doValidate(ProcessUser $obj, $cols = null)
 {
     $columns = array();
     if ($cols) {
         $dbMap = Propel::getDatabaseMap(ProcessUserPeer::DATABASE_NAME);
         $tableMap = $dbMap->getTable(ProcessUserPeer::TABLE_NAME);
         if (!is_array($cols)) {
             $cols = array($cols);
         }
         foreach ($cols as $colName) {
             if ($tableMap->containsColumn($colName)) {
                 $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
                 $columns[$colName] = $obj->{$get}();
             }
         }
     } else {
         if ($obj->isNew() || $obj->isColumnModified(ProcessUserPeer::PU_UID)) {
             $columns[ProcessUserPeer::PU_UID] = $obj->getPuUid();
         }
         if ($obj->isNew() || $obj->isColumnModified(ProcessUserPeer::PRO_UID)) {
             $columns[ProcessUserPeer::PRO_UID] = $obj->getProUid();
         }
         if ($obj->isNew() || $obj->isColumnModified(ProcessUserPeer::USR_UID)) {
             $columns[ProcessUserPeer::USR_UID] = $obj->getUsrUid();
         }
         if ($obj->isNew() || $obj->isColumnModified(ProcessUserPeer::PU_TYPE)) {
             $columns[ProcessUserPeer::PU_TYPE] = $obj->getPuType();
         }
     }
     return BasePeer::doValidate(ProcessUserPeer::DATABASE_NAME, ProcessUserPeer::TABLE_NAME, $columns);
 }