Repository navigation
Words the phone and pattern formats - #283
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Signup.Validationwords thephoneandpatternformats, 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".patternquestion that declares no pattern keeps riddler's own sentence, since that is the author's defect and not the reader's.Validation.formats/0now lists every format riddler 0.9.0 checks, so each format the editor offers is worded.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/1refusal 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 usedphoneas 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).Validationraise test now names an unlisted format instead ofphone.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 qualityis green on the branch head.