Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4ebd8a7
[Term Entry] Add Pastels Law
AnamolR Apr 13, 2025
c562eec
Update: text edit
AnamolR Apr 14, 2025
9176ec7
Merge branch 'main' into add-postels-law
AnamolR Apr 14, 2025
7218db7
Merge branch 'main' into add-postels-law
AnamolR Apr 15, 2025
87dedd4
fix formatting
AnamolR Apr 16, 2025
922e840
Merge branch 'Codecademy:main' into add-postels-law
AnamolR Apr 21, 2025
2b4cf48
Merge branch 'main' into add-postels-law
AnamolR Jun 11, 2025
984766a
Merge branch 'main' into add-postels-law
AnamolR Jun 21, 2025
a067194
Merge branch 'main' into add-postels-law
AnamolR Jun 26, 2025
13be32c
Merge branch 'main' into add-postels-law
AnamolR Jul 1, 2025
ba1d5da
Merge branch 'main' into add-postels-law
AnamolR Jul 6, 2025
f6c0e7d
Merge branch 'main' into add-postels-law
AnamolR Jul 12, 2025
006803f
Merge branch 'main' into add-postels-law
AnamolR Aug 25, 2025
f4fa297
Merge branch 'main' into add-postels-law
AnamolR Aug 28, 2025
4c3f7e8
Merge branch 'Codecademy:main' into add-postels-law
AnamolR Aug 30, 2025
24f9a87
add examples of postel's law in practive
AnamolR Aug 30, 2025
b8e5e56
consistent bullets and Postel's spelling fixed
mamtawardhani Sep 16, 2025
b09d338
Merge branch 'Codecademy:main' into add-postels-law
AnamolR Sep 16, 2025
3399049
updated image for Postel's law
AnamolR Sep 16, 2025
7f37ad3
Merge branch 'main' into add-postels-law
mamtawardhani Oct 11, 2025
ebb703a
Merge branch 'main' into add-postels-law
AnamolR Oct 15, 2025
d9e421e
Merge branch 'main' into add-postels-law
AnamolR Oct 31, 2025
1c38b89
Merge branch 'main' into add-postels-law
Sriparno08 Nov 4, 2025
d60c814
Minor changes
Sriparno08 Nov 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
Title: 'Postel’s Law'
Description: 'Postel’s Law, or the Robustness Principle, encourages flexible input handling while ensuring predictable output in UX design.'
Subjects:
- 'Web Design'
- 'Web Development'
Tags:
- 'Accessibility'
- 'Design'
- 'UX'
CatalogContent:
- 'intro-to-ui-ux'
- 'paths/front-end-engineer-career-path'
---

**Postel's Law**, also called the Robustness Principle, originates from internet protocol design and is summarized as:

> "Be liberal in what you accept, and conservative in what you send." — Jon Postel

While originally intended for software protocols, this principle is widely applicable to _UX design_. It encourages flexibility and forgiveness in how systems handle user input, while still delivering predictable, high-quality output. It is especially important in forms, input validation, error handling, and accessibility.

## What It Means in UX

In UX, Postel's Law urges designers to:

- Accommodate varied user input formats and behaviors.
- Handle edge cases gracefully rather than failing rigidly.
- Provide consistent, accessible feedback without demanding perfection from the user.

This principle reduces user frustration by allowing users to complete tasks even when their input is not perfect — supporting a more forgiving, human-centered experience.

## Benefits of Postel's Law

- **Increased usability and task success rates:** Flexible input handling prevents user errors from turning into blockers.
- **Greater inclusivity and accessibility:** Supporting different patterns of interaction helps users with diverse needs and tools.
- **Stronger resilience in edge cases:** Systems are less likely to crash or behave unexpectedly under unusual input conditions.
- **Higher trust in the interface:** When users feel understood and supported, they're more likely to engage fully with a product.

## When and Where to Apply Postel's Law

Postel's Law is especially useful when:

- **Designing forms or search bars:** Let users enter phone numbers with or without dashes, spaces, or country codes and still validate successfully.
- **Handling user errors or mistyped data:** Allow minor spelling errors in search fields and suggest corrections instead of showing zero results.
- **Designing multi-platform interactions:** Recognize inputs from different devices (e.g. touch, keyboard, voice) without rigid expectations.
- **Building accessible interactions:** Ensure that screen readers, keyboard navigation, and alternate input methods receive appropriate, predictable responses.

## How to Apply It in UX Design

- **Support multiple input formats:** Whether it is date fields, email formats, or file names, accept a range of input styles and normalize them behind the scenes.
- **Add real-time validation and correction:** Guide users gently with hints or auto-formatting instead of stopping them with hard errors.
- **Make defaults and fallbacks work intelligently:** If input is missing or incorrect, offer smart defaults or safe assumptions to keep users moving forward.
- **Use clear, non-blaming error messages:** Errors should inform, not shame. Make recovery easy and empathetic.
- **Avoid punishing unexpected behavior:** Always consider how your system should respond to unusual but still valid input, and aim for graceful degradation.

![Diagram showing search engine input into multiple suggestive outputs](https://raw.githubusercontent.com/Codecademy/docs/main/media/postels-law-input-flexibility.png)

## Limitations of the Principle

- **Overly liberal input handling can hide issues or create security concerns:** For example, accepting any format without validation can increase the risk of incorrect or malicious input.
- **Too much flexibility can reduce learnability:** Users may not know what to expect or how to interact consistently if there are no boundaries.
- **It should never compromise clarity or control:** Flexibility should support users — not confuse them.

## Examples of Postel’s Law in Practice

- **Search bars that autocorrect typos or suggest queries:** Instead of showing “no results,” the system interprets the user’s intent and offers relevant alternatives.
- **Date inputs that accept multiple formats:** Fields that let users type “August 27,” “27/08/2025,” or “08-27-25” without error.
- **Phone number fields that strip spaces or symbols:** Systems that normalize input like “(123) 456-7890” into a clean format instead of blocking it.
- **Form validation that corrects capitalization or spacing errors:** Automatically formatting names or addresses while still accepting varied input.
- **E-commerce checkouts that accept minor address variations:** Matching “Street” with “St.” or recognizing mistyped zip codes to assist in delivery.
- **Search filters that don’t break with wrong case or punctuation:** Recognizing that “UX Design” and “ux design” are the same for query purposes.
Binary file added media/postels-law-input-flexibility.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.