All rules

Phone number with two digits swapped

phone-number-varianton by defaultJapanese / English

A phone number written elsewhere with two digits swapped

Example

Flagged
# Notice To apply, phone: 0120-123-456 Contact, phone: 0120-123-465
What chaff prints
5:17 The phone number 0120-123-465 is 0120-123-456 with two neighbouring digits swapped
Fixed
# Notice To apply, phone: 0120-123-456 Contact, phone: 0120-123-456
What chaff prints
no finding

How to fix

Check which number is right and correct the other.

Why it matters

A contact number is written more than once: at the top and the bottom, under "How to apply" and under "Contact". When one place reads 0120-123-465 for 0120-123-456, the reader cannot tell which is right and may call the wrong one. Two neighbouring digits swapped is the commonest slip in typing a number. chaff compares the numbers written after labels of the same kind (Phone, Tel, call) and reports one that is another with two neighbouring digits swapped.

What it does not flag

Only numbers with a label (phone, tel, call) or a desk's name (Recall Line, Customer Care, Help Desk) before them on their line are read; a fax line's number is a fax number. Unlabelled runs of digits, numbers of different kinds (a phone and a fax number), numbers that differ in one digit (a main line and a direct line often do) and swaps of digits that are not neighbours are not reported. A number is 9 to 13 digits, grouped by hyphens or brackets.

Turning it off or relaxing it

Silence this one spot (in the document)
<!-- stet: phone-number-variant — reason -->
Relax it for the team (the reason is kept as a comment in chaff.yaml)
npx chaffjs relax phone-number-variant --why "reason"
Turn it off for the team (chaff.yaml)
rules: phone-number-variant: off
Technical details
Layer
L3
Status
stable
Severity
warning
Languages
Japanese and English
Suited to
business, technical, blog, legal, docs, academic, literature, speech

Levels

Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).

stricterror
normalwarning
relaxedwarning

This rule has no limit to count to. A level sets how a finding is marked: relaxed keeps the finding and marks it a step lower.

By genre

Runs by default in
technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper
Turned off by the genre in
literature/fiction, literature/essay, literature/poetry, literature/play, speech/address, speech/transcript

Genres

Message

The phone number {written} is {other} with two neighbouring digits swapped

This page is built from the rule's definition file:packages/chaff/rules/phone-number-variant.yaml