how do i get fields value of webform before entering into database?
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
}