It’s prohibited for a pilot to have a beard.
Some airlines forbid their pilots from having beards. The reason behind it is an oxygen mask that should fit the face tightly if an emergency situation occurs (pilots, as well as passengers, will have to put one on). A beard can prevent this.