how do i get fields value of webform before entering into database? I want value of a hidden field of webform in custom module so that i could match it with other value from database to validate it
You can use hook_form_alter to achieve this in your custom module.

/**
 * Implementation of hook_form_alter().
 */

function your_custom_module_name_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  // Add validation for a particular Webform node:
  if ($form_id == 'webform_id') {
    // Simply add the additional validate handler.
    $form['#validate'][] = 'mycustom_extra_validate';

    //$first = array_shift($form['#submit']);
    //array_unshift($form['#submit'], $first, 'mycustom_extra_submit');
  }
}

/**
 * Validation handler for Webform .
 */
function mycustom_extra_validate(&amp;$form, &amp;$form_state) {
  //condition to check validation
}