atom-validator implements validation rules based on RFC 4287 plus additional semantic checks.
Per RFC 4287 Section 4.1.1, every Atom feed must contain:
atom:id - Permanent, universally unique identifier (IRI)atom:title - Human-readable titleatom:updated - Most recent modification time (RFC 3339)Each entry must contain:
atom:id - Permanent, universally unique identifieratom:title - Human-readable titleatom:updated - Most recent modification timeAll dates must be valid RFC 3339 timestamps:
2026-06-19T12:00:00Z
2026-06-19T08:00:00-04:00
The atom:id element accepts:
urn:uuid:550e8400-e29b-41d4-a716-446655440000tag:github.com,2008:Repository/123https://example.com/feed/entry-1:stale-feed-updated)The feed's <updated> timestamp should be >= the most recent entry's <updated>.
Why? Aggregators use the feed's updated timestamp to determine if they need to re-fetch. A stale timestamp causes entries to be missed.
;; BAD: Feed older than entry
{:updated "2026-06-14T00:00:00Z"
:entries [{:updated "2026-06-19T00:00:00Z" ...}]}
;; GOOD: Feed reflects latest entry
{:updated "2026-06-19T00:00:00Z"
:entries [{:updated "2026-06-19T00:00:00Z" ...}]}
:day-of-week-mismatch)If an entry title mentions a day of the week, it should match the <updated> date.
Why? Newsletter titles like "Morning Brief: Thursday, June 19" create confusion when the actual date is a different day.
;; BAD: Title says Thursday, but 2026-06-19 is Friday
{:title "Morning Brief: Thursday, June 19"
:updated "2026-06-19T00:00:00Z"}
;; GOOD: Correct day
{:title "Morning Brief: Friday, June 19"
:updated "2026-06-19T00:00:00Z"}
This check can be disabled:
(v/validate-feed feed {:semantic? false})
:invalid-url-host)Entry link URLs are checked for:
http or https)wal.shsite instead of wal.sh/site);; BAD: Typo merged host and path
{:links [{:href "https://wal.shsite/post/1"}]}
;; GOOD: Proper URL
{:links [{:href "https://wal.sh/site/post/1"}]}
All validation rules are tested with test.check generators:
(require '[atom-validator.generators :as g]
'[clojure.test.check.generators :as gen])
;; Generate feeds with specific issues for testing
(gen/generate (g/gen-feed-with-stale-updated))
(gen/generate (g/gen-entry-with-mismatched-day))
(gen/generate (g/gen-entry-with-invalid-url))
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |