Template:Error
- Аԥсшәа
- Acèh
- Afrikaans
- Alemannisch
- Алтай тил
- Ænglisc
- अंगिका
- العربية
- ܐܪܡܝܐ
- الدارجة
- مصرى
- অসমীয়া
- Asturianu
- Авар
- Kotava
- अवधी
- Azərbaycanca
- تۆرکجه
- Башҡортса
- Basa Bali
- Bikol Central
- Беларуская (тарашкевіца)
- Беларуская
- Български
- भोजपुरी
- Banjar
- ပအိုဝ်ႏဘာႏသာႏ
- বাংলা
- Brezhoneg
- Bosanski
- Basa Ugi
- Català
- Chavacano de Zamboanga
- 閩東語 / Mìng-dĕ̤ng-ngṳ̄
- Нохчийн
- Chamoru
- کوردی
- Corsu
- Čeština
- Чӑвашла
- Cymraeg
- Dansk
- Zazaki
- ދިވެހިބަސް
- Ελληνικά
- Esperanto
- Español
- Eesti
- Euskara
- فارسی
- Mfantse
- Suomi
- Na Vosa Vakaviti
- Føroyskt
- Français
- Arpetan
- Gaeilge
- Galego
- گیلکی
- गोंयची कोंकणी / Gõychi Konknni
- Bahasa Hulontalo
- ગુજરાતી
- Farefare
- Gaelg
- Hausa
- 客家語 / Hak-kâ-ngî
- עברית
- हिन्दी
- Hrvatski
- Magyar
- Հայերեն
- Bahasa Indonesia
- Igbo
- Ilokano
- ГӀалгӀай
- Íslenska
- Italiano
- 日本語
- La .lojban.
- Jawa
- ქართული
- Qaraqalpaqsha
- Kabɩyɛ
- Tyap
- Kumoring
- Қазақша
- ភាសាខ្មែរ
- ಕನ್ನಡ
- 한국어
- کٲشُر
- Kurdî
- Latina
- Lëtzebuergesch
- Luganda
- Ligure
- Ladin
- ລາວ
- Lietuvių
- Latviešu
- मैथिली
- Мокшень
- Malagasy
- Māori
- Minangkabau
- Македонски
- മലയാളം
- Монгол
- ꯃꯤꯇꯩ ꯂꯣꯟ
- ဘာသာမန်
- मराठी
- Bahasa Melayu
- Malti
- မြန်မာဘာသာ
- مازِرونی
- नेपाली
- नेपाल भाषा
- Nederlands
- Norsk bokmål
- Novial
- IsiNdebele seSewula
- Chi-Chewa
- Occitan
- ଓଡ଼ିଆ
- Ирон
- ਪੰਜਾਬੀ
- Pangasinan
- Papiamentu
- पालि
- Polski
- پنجابی
- Ποντιακά
- پښتو
- Português
- Ikirundi
- Română
- Русский
- Ikinyarwanda
- संस्कृतम्
- ᱥᱟᱱᱛᱟᱲᱤ
- Sicilianu
- Scots
- سنڌي
- Srpskohrvatski / српскохрватски
- တႆး
- සිංහල
- Simple English
- Slovenčina
- سرائیکی
- Slovenščina
- Anarâškielâ
- Soomaaliga
- Shqip
- Српски / srpski
- SiSwati
- Seeltersk
- Sunda
- Svenska
- Kiswahili
- ꠍꠤꠟꠐꠤ
- Sakizaya
- தமிழ்
- ᥖᥭᥰ ᥖᥬᥲ ᥑᥨᥒᥰ
- తెలుగు
- Tetun
- Тоҷикӣ
- ไทย
- ትግርኛ
- Türkmençe
- Tagalog
- Setswana
- Tok Pisin
- Türkçe
- Xitsonga
- Татарча / tatarça
- Twi
- Удмурт
- Українська
- اردو
- Oʻzbekcha / ўзбекча
- Tiếng Việt
- Volapük
- Walon
- Winaray
- 吴语
- IsiXhosa
- მარგალური
- Yorùbá
- ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ
- 文言
- 閩南語 / Bân-lâm-gí
- 粵語
- 中文
- IsiZulu
{{{1}}}
This meta-template returns a state of error (recognized as such by the wiki parser function {{#iferror}}), and optionally an error-message text in red (visible to the user). It is used by other templates to signal an error (such as those caused by invalid input), which can then either be displayed to the editor or caught and handled by other templates.
Usage
{{error|An exemplary error}}→ An exemplary error{{error|message=An exemplary error}}→ An exemplary error- Compare, used in a Parser Function:
{{#expr:Foo}}→ Expression error: Unrecognized word "foo". {{#iferror:{{error|Foo}} | {{y}} | {{n}} }}→ Green tickY
Tag option
The tag to contain the error message can be given through the tag parameter, but it will only accept span, div, p, and strong, since those are the only tags recognized by the {{#iferror}} parser function. It defaults to strong, the tag generated e.g. by {{#expr}}. To prevent strong message, use one of the other tags, e.g. tag=span.
- ABC
{{error|An exemplary error demo no tag (default)}}XYZ → ABC An exemplary error demo no tag (default) XYZ - ABC
{{error|An exemplary error demo span|tag=span}}XYZ → ABC An exemplary error demo span XYZ - ABC
{{error|An exemplary error demo div|tag=div}}XYZ → ABCAn exemplary error demo divXYZ - ABC
{{error|An exemplary error demo p|tag=p}}XYZ → ABCAn exemplary error demo p
XYZ - ABC
{{error|An exemplary error demo strong|tag=strong}}XYZ → ABC An exemplary error demo strong XYZ
TemplateData
TemplateData for Error
The template returns a state of error (recognized as such by a wiki parser function), and optionally an error-message text in red (visible for the user)
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Message | 1 message | Error message text in red | String | suggested |
| Tag | tag | The tag to contain the error message; will only accept span, div, p, and strong, since those are the only tags recognized by the #iferror parser function. It defaults to strong, the tag generated e.g. by #expr
| String | optional |
See also
- {{Error-small }}
- {{Formatting error }}
- {{Error if empty }}
- #iferror: parser function
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.