Arabic form checker
Does the field accept the name «محمد» and Eastern Arabic digits?
- Checks your page
- 3 browsers
- 3 rules
- Last updated
What we keep
The result appears here
Enter your page’s address and press “Check the page”. This is what the tool runs on it:
- Name field rejects Arabic namesnot started
- Number field rejects Arabic-Indic digitsnot started
- Form field without a labelnot started
What it checks
- A name field's
patternaccepts Arabic names such as «محمد العبري», «أحمد» and «آمنة», as it accepts Latin names of the same length and number of words. - Ranges such as
[ا-ي], which leave out ء أ إ آ ؤ ئ, so «محمد» gets through and «أحمد» does not. - The
patternof number fields, such as a phone number, a verification code or a postal code, accepts Eastern Arabic digits١٢٣as it accepts Western digits123. - Every input and textarea has a name that screen readers read: a
<label>tied to it,aria-label,aria-labelledby,titleor a placeholder.
Example
<label for="name">الاسم الكامل</label> <input id="name" name="full_name" autocomplete="name" pattern="[A-Za-z ]{3,40}" required />
<label for="name">الاسم الكامل</label> <input id="name" name="full_name" autocomplete="name" pattern="[\p{L}\p{M} '\-]{2,60}" />
How to fix
Allow the letters of every script in a name field's pattern, with the Unicode properties browsers understand in pattern, and accept in number fields the digits people type:
\p{L}accepts the letters of every script, and\p{M}keeps harakat such as the shadda. Or drop the pattern and limit the length withminlengthandmaxlength.[0-9٠-٩۰-۹]accepts Western, Eastern Arabic and Persian digits, and\p{Nd}the decimal digits of every script. Then convert the digits to Western ones before you check or store the number, and accept the same names on the server.- If you need the name in Latin letters, for a passport or a payment card, ask for it in a field of its own whose label says so.
- Tie every field to its label:
<label for="email">withid="email"on the field, or the field inside its<label>. For a field without visible text, such as a search box, usearia-label.
<label for="name">الاسم الكامل</label>
<input id="name" name="name" autocomplete="name" pattern="[\p{L}\p{M} '\-]{2,60}" />
<label for="phone">رقم الجوال</label>
<input id="phone" name="phone" type="tel" autocomplete="tel" pattern="[0-9٠-٩۰-۹]{8}" dir="ltr" />FAQ
No. Arablyzer never submits forms, types into their fields, or presses Enter or buttons. We read each field's pattern from the page's HTML and test names and numbers against it as the browser does when it validates the field, and we check the fields' labels on the rendered page without touching them.
Because its pattern uses a range such as [ا-ي]. The range looks like the whole alphabet, but it starts at alef in Unicode, and ء أ إ آ ؤ ئ come before it, so they fall outside: «محمد» gets through, and «أحمد» and «إياد» do not. Use \p{L} instead.
No. We leave out fields that ask for the name in English or as in the passport, and user name, company, card and bank name fields; we recognise them by autocomplete and by the field's name, label and placeholder. So say it in the field's label, such as «الاسم بالإنجليزية كما في الجواز».
Because \d and [0-9] in a pattern match Western digits only. Arabic keyboards, especially on phones, can type Eastern Arabic digits, and numbers copied from Arabic text carry them, so the browser stops the form with a message that only asks to match the requested format.
What this tool runs
- Name field rejects Arabic namesserious
form-arabic-name-rejected - Number field rejects Arabic-Indic digitsmoderate
form-arabic-digits-rejected - Form field without a labelcritical
form-label-missing
How we measure
Arablyzer never submits a form. We fetch the page as ArablyzerBot and read its fields in the HTML as the server sends it: a name field by its autocomplete, such as name, given-name or family-name, or by its name, id, label or placeholder, and a number field by type="tel", inputmode, autocomplete or a pattern made of digits only. We test each field's pattern as the browser does, the whole value with the v flag: with Arabic names and Latin names of the same length and number of words, and with Western-digit numbers and the same numbers in Eastern Arabic digits. Patterns that do not compile are ignored, as browsers ignore them, and so are patterns that take too long to run. We test patterns on Arabic pages only: those whose <html lang> is Arabic or whose text is mostly Arabic. Then we render the page in Chromium, Firefox and WebKit and run axe-core 4.13.0's label rule on its fields; lists (<select>) are a different rule, which we do not run yet. The same page gives the same result on every check.