Make either of 2 fields required but not both?
Check this thread and Conditional fields module.

If you're using D7 - the principle is the same as in the thread I linked. Basically you need to attach the name of your processing function to the validation array and there perform the checks.