[{"data":1,"prerenderedAt":75},["ShallowReactive",2],{"content:en:blog\u002Fsignup-form-validation-best-practices":3},{"path":4,"locale":5,"section":6,"title":7,"description":8,"html":9,"headings":10,"faq":52,"updated":71,"order":72,"words":73,"meta":74},"blog\u002Fsignup-form-validation-best-practices","en","blog","Signup form validation best practices: fewer fields, better errors, checks that run on the server","How to validate a signup form without losing real users: when to check, how to word errors, accessible markup, server-side checks and proportionate friction.","\u003Cp>A signup form should make the right answer easy and the wrong answer visible. Ask for as little as you need, check each field when the person leaves it, explain errors next to the field in words they can act on, and run the checks that matter on your server, where they cannot be skipped. Every other rule here follows from keeping real people moving while your data stays clean.\u003C\u002Fp>\n\u003Ch2 id=\"ask-for-less\">\u003Ca class=\"heading-link\" href=\"#ask-for-less\">\u003Cspan>Ask for less\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Each field is a place to lose someone. Before you add one, ask what you would lose without it.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Email and password are usually enough.\u003C\u002Fstrong> Ask for a name, a company or a phone number only when the product needs it at signup. Ask later, in context, when the reason is obvious.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>One field per fact.\u003C\u002Fstrong> One name field, not first, middle and last, unless something downstream needs the parts. One phone field with a country selector, not three boxes.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Do not ask twice.\u003C\u002Fstrong> A &quot;confirm your email&quot; field mostly teaches people to paste. A typo suggestion and a confirmation email do the job better.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Say what each field is for\u003C\u002Fstrong> when it is not obvious, especially a phone number. People give a number to a form that says why.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>A shorter form also collects less personal data, which helps under the GDPR principle of data minimisation. See \u003Ca href=\"\u002Fblog\u002Fgdpr-contact-data-validation\">GDPR and contact data validation\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"when-to-validate\">\u003Ca class=\"heading-link\" href=\"#when-to-validate\">\u003Cspan>When to validate\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Moment\u003C\u002Fth>\n\u003Cth>What to do\u003C\u002Fth>\n\u003Cth>Why\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>While typing\u003C\u002Ftd>\n\u003Ctd>Light hints only: format as you go, show a character counter\u003C\u002Ftd>\n\u003Ctd>A half-typed value is not an error\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>On blur\u003C\u002Ftd>\n\u003Ctd>Check the field and show a specific error if it fails\u003C\u002Ftd>\n\u003Ctd>The person has finished with the field\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>On submit\u003C\u002Ftd>\n\u003Ctd>Check every field, focus the first error\u003C\u002Ftd>\n\u003Ctd>Catches what blur missed, and values filled by a browser\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>On the server\u003C\u002Ftd>\n\u003Ctd>Repeat every rule, then add the data checks\u003C\u002Ftd>\n\u003Ctd>The only check an attacker cannot skip\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Clear an error as soon as the value becomes valid, not on the next submit. Never disable the submit button as the only signal of a problem: a greyed-out button with no explanation is the worst error message.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-code-block>\u003Cdiv class=\"code-head\">\u003Cspan class=\"code-label\">javascript\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode class=\"language-javascript\">\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> field\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> document.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">querySelector\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'#email'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> message\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> document.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">querySelector\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'#email-error'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">field.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">addEventListener\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'blur'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, () \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">=>\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> value\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> field.value.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">trim\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> ok\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> value.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">includes\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'@'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">&#x26;&#x26;\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> !\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\u002F\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">\\s\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\u002F\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">test\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(value)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  field.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">setAttribute\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'aria-invalid'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">String\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">!\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">ok))\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  message.textContent \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> ok \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">?\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> ''\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> :\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> 'Enter your email as name@example.com.'\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">})\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">field.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">addEventListener\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'input'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, () \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">=>\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (field.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">getAttribute\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'aria-invalid'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">===\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> 'true'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> &#x26;&#x26;\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> field.value.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">includes\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'@'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">)) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    field.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">setAttribute\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'aria-invalid'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'false'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    message.textContent \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> ''\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">})\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdiv>\n\u003Cp>The client check is deliberately loose. A strict pattern in the browser rejects real addresses, and \u003Ca href=\"\u002Fblog\u002Femail-validation-regex\">email validation regex\u003C\u002Fa> shows how little a pattern can know.\u003C\u002Fp>\n\u003Ch2 id=\"write-errors-people-can-act-on\">\u003Ca class=\"heading-link\" href=\"#write-errors-people-can-act-on\">\u003Cspan>Write errors people can act on\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>An error message has three jobs: say which field, say what is wrong and say how to fix it.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Instead of\u003C\u002Fth>\n\u003Cth>Write\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Invalid input\u003C\u002Ftd>\n\u003Ctd>Enter your email as name@example.com\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Invalid phone\u003C\u002Ftd>\n\u003Ctd>This number looks too short for France. Check the digits.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Error\u003C\u002Ftd>\n\u003Ctd>This address cannot receive email. Did you mean jane@gmail.com?\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Password rejected\u003C\u002Ftd>\n\u003Ctd>Use at least 12 characters. This one appears in a list of leaked passwords.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Rules to keep:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Show the error next to the field\u003C\u002Fstrong>, in text, in addition to color. Color alone fails people who cannot see it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Keep what the person typed.\u003C\u002Fstrong> Never clear a field because it failed.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Do not blame.\u003C\u002Fstrong> Say what to do, not what they did.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Show an example\u003C\u002Fstrong> for the selected country when a phone number fails.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Suggest a fix when you can.\u003C\u002Fstrong> The email API returns \u003Ccode>did_you_mean\u003C\u002Fcode> when a domain looks like a typo of a common one, such as \u003Ccode>gmial.com\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"accessible-markup\">\u003Ca class=\"heading-link\" href=\"#accessible-markup\">\u003Cspan>Accessible markup\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Forms are where accessibility failures cost the most. The WCAG success criteria that apply most directly:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Criterion\u003C\u002Fth>\n\u003Cth>What it asks for\u003C\u002Fth>\n\u003Cth>In practice\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>3.3.2 Labels or Instructions\u003C\u002Ftd>\n\u003Ctd>Labels or instructions are provided when content needs user input\u003C\u002Ftd>\n\u003Ctd>A visible \u003Ccode>&lt;label&gt;\u003C\u002Fcode> for each field, not a placeholder\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>3.3.1 Error Identification\u003C\u002Ftd>\n\u003Ctd>An error is identified and described in text\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>aria-invalid\u003C\u002Fcode> and a message linked with \u003Ccode>aria-describedby\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>3.3.3 Error Suggestion\u003C\u002Ftd>\n\u003Ctd>A suggestion is offered when one is known\u003C\u002Ftd>\n\u003Ctd>The \u003Ccode>did_you_mean\u003C\u002Fcode> text, or the expected format\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>1.3.5 Identify Input Purpose\u003C\u002Ftd>\n\u003Ctd>Fields about the user carry their purpose in code\u003C\u002Ftd>\n\u003Ctd>Correct \u003Ccode>autocomplete\u003C\u002Fcode> values\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Useful attributes: \u003Ccode>type=&quot;email&quot;\u003C\u002Fcode> with \u003Ccode>autocomplete=&quot;email&quot;\u003C\u002Fcode>, \u003Ccode>type=&quot;tel&quot;\u003C\u002Fcode> with \u003Ccode>autocomplete=&quot;tel&quot;\u003C\u002Fcode> and \u003Ccode>inputmode=&quot;tel&quot;\u003C\u002Fcode> for a phone number, and \u003Ccode>autocomplete=&quot;new-password&quot;\u003C\u002Fcode> on a password. Do not use \u003Ccode>type=&quot;number&quot;\u003C\u002Fcode> for a phone number, because it drops the \u003Ccode>+\u003C\u002Fcode> and leading zeros. Move focus to the first invalid field after a failed submit, and announce the error to screen readers.\u003C\u002Fp>\n\u003Ch2 id=\"passwords\">\u003Ca class=\"heading-link\" href=\"#passwords\">\u003Cspan>Passwords\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>If you ask for a password, follow current guidance instead of folklore. NIST Special Publication 800-63B recommends allowing long passwords, checking a chosen password against lists of commonly used or compromised passwords, and not imposing composition rules or periodic changes without evidence of compromise. In a form, that means a length minimum, a clear message when a password is on a blocklist, a show-password toggle and support for password managers, and no rules like one capital, one symbol.\u003C\u002Fp>\n\u003Ch2 id=\"validate-on-the-server\">\u003Ca class=\"heading-link\" href=\"#validate-on-the-server\">\u003Cspan>Validate on the server\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Everything above is for the person. The server is for the truth. It repeats every rule and adds the checks a browser cannot make.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Field\u003C\u002Fth>\n\u003Cth>What the server can add\u003C\u002Fth>\n\u003Cth>Endpoint\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Email\u003C\u002Ftd>\n\u003Ctd>Typo suggestion, domain with mail servers, disposable and role addresses, mailbox check\u003C\u002Ftd>\n\u003Ctd>\u003Ca href=\"\u002Fdocs\u002Fapi-reference\u002Femail\">email\u003C\u002Fa>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Phone\u003C\u002Ftd>\n\u003Ctd>Validity in the numbering plan, E.164 form, line type\u003C\u002Ftd>\n\u003Ctd>\u003Ca href=\"\u002Fdocs\u002Fapi-reference\u002Fphone\">phone\u003C\u002Fa>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>IP address\u003C\u002Ftd>\n\u003Ctd>Country, network type, Tor, VPN, proxy and data center flags, risk level\u003C\u002Ftd>\n\u003Ctd>\u003Ca href=\"\u002Fdocs\u002Fapi-reference\u002Fip\">ip\u003C\u002Fa>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>A batch call runs all three in one request:\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-code-block>\u003Cdiv class=\"code-head\">\u003Cspan class=\"code-label\">javascript\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode class=\"language-javascript\">\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">export\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> async\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> function\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> checkSignup\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">({ \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">email\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">phone\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">country\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">ip\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> items\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> [{ type: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'email'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, email, mode: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'fast'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }]\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (phone) items.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">push\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(country \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">?\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { type: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'phone'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, phone, country } \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">:\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { type: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'phone'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, phone })\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (ip) items.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">push\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">({ type: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'ip'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, ip })\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  let\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> data\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  try\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">    const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> response\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> await\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> fetch\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'https:\u002F\u002Fapi.qelka.com\u002Fv1\u002Fbatch'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">      method: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'POST'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">      headers: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">        Authorization: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">`Bearer ${\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">process\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">env\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">API_KEY\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">}`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">        'Content-Type'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'application\u002Fjson'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">      },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">      body: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">JSON\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">stringify\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">({ items }),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">      signal: AbortSignal.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">timeout\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">8000\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    })\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">    if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">!\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">response.ok) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { checked: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">false\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    data \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">await\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> response.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">json\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">()).data\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  } \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">catch\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">    return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { checked: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">false\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> [\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">emailResult\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">...\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">rest\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">] \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> data\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> phoneResult\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> phone \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">?\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> rest[\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">0\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">] \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">:\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> null\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { checked: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">true\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, emailResult, phoneResult }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdiv>\n\u003Cp>Run the check once, on submit, on the server. The function above returns \u003Ccode>checked: false\u003C\u002Fcode> when anything goes wrong, so the caller can let the signup through. The full version, with the three outcomes, is in \u003Ca href=\"\u002Fdocs\u002Fguides\u002Fvalidate-signup-forms\">validate signup forms\u003C\u002Fa>, and the batch endpoint is described in the \u003Ca href=\"\u002Fdocs\u002Fapi-reference\u002Fbatch\">batch reference\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch3 id=\"fail-open-except-where-a-failure-costs-money\">\u003Ca class=\"heading-link\" href=\"#fail-open-except-where-a-failure-costs-money\">\u003Cspan>Fail open, except where a failure costs money\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>If the API is slow or unreachable, let the signup go through and check the address later. A validation service should never be the reason nobody can register. The exception is a paid action. Do not send an SMS code when the number could not be checked, because each message costs money and \u003Ca href=\"\u002Fblog\u002Fsms-pumping-fraud\">SMS pumping fraud\u003C\u002Fa> preys on forms that send first and think later.\u003C\u002Fp>\n\u003Ch2 id=\"decide-what-each-result-does\">\u003Ca class=\"heading-link\" href=\"#decide-what-each-result-does\">\u003Cspan>Decide what each result does\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Result\u003C\u002Fth>\n\u003Cth>Outcome\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Email \u003Ccode>deliverable\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Accept\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Email \u003Ccode>undeliverable\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Ask for a correction, with \u003Ccode>did_you_mean\u003C\u002Fcode> if present\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Email \u003Ccode>risky\u003C\u002Fcode>, \u003Ccode>disposable\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Your policy: refuse with a clear message, or accept and flag\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Email \u003Ccode>risky\u003C\u002Fcode>, \u003Ccode>catch_all\u003C\u002Fcode>, or \u003Ccode>unknown\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Accept, and let the confirmation email settle it\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Phone \u003Ccode>valid\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Accept, store \u003Ccode>e164\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Phone \u003Ccode>invalid\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Ask for a correction\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Phone \u003Ccode>unknown\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Ask for the country\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>IP \u003Ccode>risk.level\u003C\u002Fcode> \u003Ccode>high\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Add a step: confirm email or phone before activating the account\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Never block on \u003Ccode>unknown\u003C\u002Fcode>: it means the check could not reach a conclusion. Never block on an IP level alone, since VPNs and corporate networks are everyday tools. \u003Ca href=\"\u002Fblog\u002Fprevent-fake-signups\">Prevent fake signups\u003C\u002Fa> combines the signals, and \u003Ca href=\"\u002Fblog\u002Fvpn-detection\">VPN, proxy and Tor detection\u003C\u002Fa> explains the flags.\u003C\u002Fp>\n\u003Ch2 id=\"confirm-do-not-just-validate\">\u003Ca class=\"heading-link\" href=\"#confirm-do-not-just-validate\">\u003Cspan>Confirm, do not just validate\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Validation says an address can receive mail. It does not say the person controls it. Send a confirmation email and activate the account when the link is used, or let people use the product with limits until then. For a phone number, a one-time code proves possession. Validate before you send either, so you do not pay for impossible destinations. \u003Ca href=\"\u002Fblog\u002Fphone-number-validation\">Phone number validation\u003C\u002Fa> covers the difference between validating and verifying.\u003C\u002Fp>\n\u003Ch2 id=\"add-friction-in-proportion\">\u003Ca class=\"heading-link\" href=\"#add-friction-in-proportion\">\u003Cspan>Add friction in proportion\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Real people are the majority. Friction should rise with the evidence, and with what is at stake.\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Nothing for clean signups.\u003C\u002Fstrong> Most traffic should not notice your defences.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A confirmation for weak signals.\u003C\u002Fstrong> A \u003Ccode>medium\u003C\u002Fcode> IP level, a catch-all domain or a mismatched country earns an email confirmation before trial credits.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>An extra step for strong signals.\u003C\u002Fstrong> A Tor exit with a disposable address earns phone verification or review.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Limits behind the form.\u003C\u002Fstrong> Rate limit signups per IP, per network and per device, so scripts cannot try thousands of variations.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Hold what attackers want.\u003C\u002Fstrong> Delay rewards and credits until the account has some history.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>A blocklist with no appeal turns a defence into a support burden. Offer a way out: a message that says what to do next, and a contact address.\u003C\u002Fp>\n\u003Ch2 id=\"measure-the-form\">\u003Ca class=\"heading-link\" href=\"#measure-the-form\">\u003Cspan>Measure the form\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>You can only improve what you watch. Track these from your own data:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Completion rate\u003C\u002Fstrong> from first field touched to account created.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Error rate per field\u003C\u002Fstrong>, to see which message confuses people.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Bounce rate of the confirmation email\u003C\u002Fstrong>, which falls when typo suggestions work.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Share of signups that confirm.\u003C\u002Fstrong>\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Abuse that got through\u003C\u002Fstrong>, such as accounts later banned, split by the signals they showed at signup.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Do not copy another site's thresholds. Run any new rule in shadow mode first: log what it would have done for two weeks and read the cases.\u003C\u002Fp>\n\u003Ch2 id=\"test-it\">\u003Ca class=\"heading-link\" href=\"#test-it\">\u003Cspan>Test it\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>A test key, \u003Ccode>sk_test_\u003C\u002Fcode>, returns sample data and spends no credits, so you can build the whole flow before launch. See \u003Ca href=\"\u002Fdocs\u002Ftest-mode\">test mode\u003C\u002Fa>. Try the checks by hand with the free \u003Ca href=\"\u002Ftools\u002Femail-verifier\">email verifier\u003C\u002Fa>, \u003Ca href=\"\u002Ftools\u002Fphone-validator\">phone validator\u003C\u002Fa> and \u003Ca href=\"\u002Ftools\u002Fip-lookup\">IP lookup\u003C\u002Fa>, and see \u003Ca href=\"\u002Fhelp\u002Fvalidate-phone-numbers-in-signup-form\">validate phone numbers in a signup form\u003C\u002Fa> and \u003Ca href=\"\u002Fhelp\u002Fblock-disposable-emails-at-signup\">block disposable emails at signup\u003C\u002Fa> for the practical steps.\u003C\u002Fp>\n\u003Ch2 id=\"where-to-go-next\">\u003Ca class=\"heading-link\" href=\"#where-to-go-next\">\u003Cspan>Where to go next\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fuse-cases\u002Fsignup-fraud-prevention\">Signup fraud prevention\u003C\u002Fa> for how teams use the checks together.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fhelp\u002Fstop-fake-signups-without-captcha\">Stop fake signups without a CAPTCHA\u003C\u002Fa> for the lighter alternative.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fpricing\">Pricing\u003C\u002Fa> for credits and plans.\u003C\u002Fli>\n\u003C\u002Ful>\n",[11,15,18,21,24,27,30,34,37,40,43,46,49],{"id":12,"text":13,"depth":14},"ask-for-less","Ask for less",2,{"id":16,"text":17,"depth":14},"when-to-validate","When to validate",{"id":19,"text":20,"depth":14},"write-errors-people-can-act-on","Write errors people can act on",{"id":22,"text":23,"depth":14},"accessible-markup","Accessible markup",{"id":25,"text":26,"depth":14},"passwords","Passwords",{"id":28,"text":29,"depth":14},"validate-on-the-server","Validate on the server",{"id":31,"text":32,"depth":33},"fail-open-except-where-a-failure-costs-money","Fail open, except where a failure costs money",3,{"id":35,"text":36,"depth":14},"decide-what-each-result-does","Decide what each result does",{"id":38,"text":39,"depth":14},"confirm-do-not-just-validate","Confirm, do not just validate",{"id":41,"text":42,"depth":14},"add-friction-in-proportion","Add friction in proportion",{"id":44,"text":45,"depth":14},"measure-the-form","Measure the form",{"id":47,"text":48,"depth":14},"test-it","Test it",{"id":50,"text":51,"depth":14},"where-to-go-next","Where to go next",[53,56,59,62,65,68],{"q":54,"a":55},"When should a signup form validate its fields?","On blur, when the person leaves a field, and again on submit. Validating on every keystroke flags a half-typed address as wrong and annoys people. Keep light formatting hints while typing, show errors once a field has been left, and clear an error as soon as the value becomes correct. The decisive checks, the ones that cost credits, run on your server after submit.",{"q":57,"a":58},"Is client-side validation enough?","No. Anyone can send a request straight to your endpoint and skip your page. Client-side checks are for speed and clarity, and the server must repeat every rule that matters. The server is also where you can call an API for what the browser cannot know, such as whether an email domain receives mail, and where your secret key can stay private.",{"q":60,"a":61},"How should I word form error messages?","Say what is wrong and how to fix it, next to the field, in plain words: Enter your email as name@example.com, or This number looks too short for France. Avoid Invalid input. WCAG Success Criterion 3.3.1 asks that an error is identified in text, and 3.3.3 asks for a suggestion when one is known. Keep what the person typed in the field.",{"q":63,"a":64},"Should I ask for a phone number at signup?","Only if the product needs it, because every extra field costs signups, and a phone number also opens the door to SMS fraud if you text it. If you need one, ask for it at the step where it matters, validate it before sending a code and verify possession with a one-time code. Many products ask for it later, before the first valuable action.",{"q":66,"a":67},"Should a signup form block disposable email addresses?","It is a policy choice. If an account is worth something, such as a trial with real cost, refusing disposable domains with a clear message is reasonable. If not, accept and flag them. Qelka returns \u003Ccode>status: &quot;risky&quot;\u003C\u002Fcode> with reason \u003Ccode>disposable\u003C\u002Fcode> so you can pick either. Whatever you choose, tell the person why, and offer to continue with another address.",{"q":69,"a":70},"What should happen when the validation service is down?","Let the signup through. A validation outage should never be the reason nobody can register. Give each call a short timeout, treat a failure as unchecked, record that the checks did not run and verify the address later, with a confirmation email or a retry. Fail closed only for actions that cost you money, such as sending a paid SMS code.","2026-11-24",25,1793,{},1795559504255]