How do I remove default comment validation in drupal 7?
You can see error message because comment_body is required for comment entity.
You can delete #required parameter for comment_body:

function my_module_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if(strpos($form_id, 'comment_node_erpal_task_form') !== FALSE) {
    $form['comment_body'][LANGUAGE_NONE][0]['#required'] = FALSE;
  }
}


But just know that you'll have php notice then. Because posting comment without the body is not right:


  Notice: Undefined offset: 0 in comment_submit() (line 2197 of
  W:\home\erpal.local\www\modules\comment\comment.module).


Make sure yhat you added custom validation for body field.

You you can handle validation callbacks for the whole form in $form['#validate'] array. Also you can handle validation callbacks for each form element in #element_validate array. E.g. for comment_body:

$form['comment_body'][LANGUAGE_NONE]['#element_validate'][] = '_my_module_comment_body_validate';


Update

You musn't change any code in Drupal core modules, it's very bad hardcode. You can do all your logic that you added to comment.module in hook_form_alter.

function my_module_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if(strpos($form_id, 'comment_node_erpal_task_form') !== FALSE) {
    $form['comment_body'][LANGUAGE_NONE][0]['#required'] = FALSE;

    if(isset($form['#node']-&gt;type) &amp;&amp; $form['#node']-&gt;type=='iks_videos_youtube_video') {
      $vtype='yt';
    }
    else {
      $vtype='v'; 
    }

    $url = url('video/' . $form['#node']-&gt;video_id[LANGUAGE_NONE][0]['value'] . '/'.$vtype.'/' . strtolower(str_replace(' ', '_', $form['#node']-&gt;title))); 
    $form['#action'] =  $url;  
  }
}