def validate_marriage_before_death(gedcom):
    """
    Marriage should occur before death of either spouse
    """
    result = []
    for family in gedcom.families:
        marriage_date = family.married
        if marriage_date:
            husband = gedcom.individual_with_id(family.husband_id)
            wife = gedcom.individual_with_id(family.wife_id)
            if husband.death is not None:
                if husband.death < marriage_date:
                    result.append(f'Error: US05: Family ({family.id}) has the husband {husband.name} ({family.husband_id})'
                                f' death date ({husband.death.strftime("%x")}) before the marriage date ({marriage_date.strftime("%x")})')
            if wife.death is not None:
                if wife.death < marriage_date:
                    result.append(f'Error: US05: Family ({family.id}) has the wife {wife.name} ({family.wife_id})'
                                f' death date ({wife.death.strftime("%x")}) before the marriage date ({marriage_date.strftime("%x")})')
    return result