How to validate 3 or more fields when creating content in D7
Create a module to add a validation handler to the form by implementing hook_form_alter():

function MODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'MY_FORM_ID') {
    $form['#validate'][] = '_MODULE_validate';
  }
}


Then define the handler function that checks the field values:

function _MODULE_validate($form, &amp;$form_state) {
  // Check that the sum of the fields equals a predefined total
}


If you're not familiar with creating your own modules, but are comfortable with PHP, you could probably use the Field Validation module to add a custom PHP validator that does the same thing.