Hydrogen is the simplest atom, a proton (with no or some neutrons, in the nucleus) and an electron orbiting it in K shell. The principal quantum number is therefore n=1. The possible values for other quantum numbers are l=0, m=0 and s=+1/2 or -1/2. So a hydrogen atom can have two electrons to fill its primary capacity. So, hydrogen follows the law of two, not the law of eight.
Take HX for example. The 1s1 of H will bond with an unpaired electron of the Valence shell of the halogen X to form hydrogen halide. Here the halogen will have an octet, but hydrogen will have two electrons in its Valence shell.