Mandatory field (A or B) in a content type
You could use the Field validation module to take out some of the legwork.  


  This module adds an extra tab to each field instance, allowing you to
  specify validation rules for your field instances.


There's a validation rule built in for 


  Require at least one of several fields


which is exactly what you're after.