Skip to content

Words the phone and pattern formats - #283

Merged
johnnyt merged 1 commit into
mainfrom
se-s48q-phone-pattern-formats
Nov 28, 2026
Merged

johnnyt merged 1 commit into
mainfrom
se-s48q-phone-pattern-formats

Conversation

@johnnyt

@johnnyt johnnyt commented Nov 28, 2026

Copy link
Copy Markdown
Member

What

Signup.Validation words the phone and pattern formats, so a text question naming either is checked and its findings are put to a reader in the same register as the email, integer, number and date and time formats. The screen editor's Try no longer refuses such a page.

  • phone: "must be a phone number, with at least seven digits" (riddler counts the digits; seven is its shortest subscriber number).
  • pattern: "must be written in the form this question asks for".
  • A pattern question that declares no pattern keeps riddler's own sentence, since that is the author's defect and not the reader's.
  • Validation.formats/0 now lists every format riddler 0.9.0 checks, so each format the editor offers is worded.
  • The moduledoc paragraph that named the formats is reflowed like its neighbours.

Which branch of the acceptance, and why

The first: messages with a test each, rather than a clearer refusal. Riddler already checks both formats and the editor already offers both, so the refusal was the only thing standing between an author and a working page. The Try.start/1 refusal stays, for a hand-written document that names a format with no message.

Tests

  • Validation: one test per format, with typos that fail and a good value that passes, and one for the pattern question with no pattern.
  • ScreenEditorLive: the page tries a phone question and tells "555" in the new words. This replaces the test that used phone as its unsupported example; the editor's format field now only offers worded formats, so the page cannot author an unsupported one.
  • ScreenEditor.Try: a document built by hand with an unlisted format is refused as {:unsupported_format, keys} with nothing started (this pins the refusal the page test used to reach).
  • The Validation raise test now names an unlisted format instead of phone.

Provenance

Read against riddler 0.9.0 (the version in mix.lock). The message wording is this app's own and carries no host-facing promise.

Full mix quality is green on the branch head.

Signup.Validation had a reader-facing message for the email, integer,
number and date and time formats alone, so a text question naming the
phone or pattern format raised at the first press and the screen editor
refused to try it. Both now have a message: a phone number with at
least seven digits, and the form the question asks for. Every format
the editor offers is now worded; the Try's refusal stays for a document
written by hand that names a format with no message.

The moduledoc line that named the formats ran long and is wrapped like
the lines around it.

Refs: se-s48q
@johnnyt
johnnyt merged commit 9d16269 into main Nov 28, 2026
4 checks passed
@johnnyt
johnnyt deleted the se-s48q-phone-pattern-formats branch November 28, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant