The Shulchan Aruch · Orach Chayim
אורח חיים תקל״אOrach Chayim 531
Siman 531 of 697 in Orach Chayim — 8 se'ifim
הלכות חול המועדLaws of Chol HaMoed· siman 531
Se’if 1א׳
מִצְוָה לְגַלֵּחַ בְּעֶרֶב יוֹם טוֹב.
1. The Laws of Shaving on Chol Hamoed, 8 Seifim: It is a mitzvah to shave on the day before a holiday.
Se’if 2ב׳
אֵין מְגַלְּחִין בַּמּוֹעֵד, אֲפִלּוּ אִם לֹא גִּלַּח קֹדֶם מוֹעֵד.
2. One may not shave during the holiday, even if he shaved before the holiday.
Se’if 3ג׳
אֲפִלּוּ אִם הָיָה אָנוּס וּמִפְּנֵי כָּךְ לֹא גִּלֵּחַ בְּעֶרֶב יוֹם טוֹב, אֵינוֹ מְגַלֵּחַ בַּמּוֹעֵד; וְהוּא הַדִּין לְמִי שֶׁהָיָה חוֹלֶה וְנִתְרַפֵּא בַּמּוֹעֵד.
3. Even if one was forced and thus did not shave on the day before the holiday, he should not shave during hol hamoed. This is also the rule for one who was sick and got better during the holiday.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0