if (!empty($forms['tantou_id'])) {
     foreach ($forms['tantou_id'] as $k => $v) {
         if ($forms['tantou_name'][$k] != '' && $forms['mail_address'][$k] != '') {
             $forms['mutirow'][] = array("id" => $v, "tantou_name" => $forms['tantou_name'][$k], "mail_address" => $forms['mail_address'][$k]);
         }
     }
 }
 if ($forms['mode'] == 'input') {
     // check corporate items
     $err = new Class_ERROR();
     $corporate_chk = $corporate_dao->get_checks();
     foreach ($corporate_chk as $kcol => $chkval) {
         $err_mes[$kcol] = $err->check($forms[$kcol], $chkval);
     }
     //郵便番号判定
     $err_mes['post_code'] = $err->zipcode_check($forms['region'] . '-' . $forms['branch']);
     //電話番号判定
     $err_mes['tel'] = $err->tel_check($forms['area_code'] . '-' . $forms['office_number'] . '-' . $forms['called_number']);
     $index = 0;
     $tantou_dao = new Class_mp_corporate_tantou($corporate_dao->get_db());
     // get tantou checked items
     $tantou_chk = $tantou_dao->get_checks();
     // check each tantou item
     foreach ($forms['mutirow'] as $k => $v) {
         if ($v['tantou_name'] != '' && $v['mail_address'] != '') {
             $err_mes['tantou_name'][$index] = $err->check($v['tantou_name'], $tantou_chk['tantou_name']);
             $err_mes['mail_address'][$index] = $err->check($v['mail_address'], $tantou_chk['mail_address']);
             $index = $index + 1;
         }
     }
     // corporate_name virification check