It is a national requirement that all decks higher than 30” above the ground have a guardrail. If your deck is below 30” from the ground, you must still follow building code requirements.