Validating and Modifying Form Data Simultaneously
The $form_state variable is passed to your validation function by reference. This means you can indeed alter the value while validating it.

function mymodule_myform_validate($form, &amp;$form_state) {
  if (...) {
    // Value is valid
    $form_state['values']['my_form_element'] = NEW VALUE;
  }
  else {
    // Set form error.
  }
}