Template:Error
- English
- español
- 日本語
- français
- 中文
- русский
- italiano
- português
- polski
- Nederlands
- العربية
- аԥсшәа
- Acèh
- Afrikaans
- None
- алтай тил
- Æ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
- eesti
- euskara
- فارسی
- mfantse
- suomi
- føroyskt
- Gaeilge
- galego
- گیلکی
- गोंयची कोंकणी / Gõychi Konknni
- Bahasa Hulontalo
- ગુજરાતી
- farefare
- Gaelg
- Hausa
- 客家語 / Hak-kâ-ngî
- עברית
- हिन्दी
- magyar
- հայերեն
- Bahasa Indonesia
- Igbo
- Ilokano
- гӀалгӀай
- íslenska
- la .lojban.
- Jawa
- ქართული
- Qaraqalpaqsha
- Kabɩyɛ
- Tyap
- Kumoring
- қазақша
- ភាសាខ្មែរ
- ಕನ್ನಡ
- 한국어
- कॉशुर / کٲشُر
- kurdî
- Latina
- Ligure
- Ladin
- ລາວ
- lietuvių
- latviešu
- मैथिली
- мокшень
- Malagasy
- Māori
- Minangkabau
- македонски
- മലയാളം
- монгол
- ꯃꯤꯇꯩ ꯂꯣꯟ
- ဘာသာမန်
- मराठी
- Bahasa Melayu
- Malti
- မြန်မာဘာသာ
- مازِرونی
- नेपाली
- नेपाल भाषा
- Novial
- Chi-Chewa
- occitan
- ଓଡ଼ିଆ
- ирон
- ਪੰਜਾਬੀ
- Pangasinan
- Papiamentu
- पालि
- پنجابی
- Ποντιακά
- پښتو
- 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
- walon
- Winaray
- 吴语
- isiXhosa
- მარგალური
- Yorùbá
- ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ
- isiZulu
{{{1}}}
Category:Semi-protected templates#Error![]() | Uses Lua: |
This meta 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). It is used by other templates to signal an error, for example 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}} | yes | no }}
→ yes
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 #expre
. 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 → ABC An exemplary error demo divXYZ
- ABC {{error|An exemplary error demo p|tag=p}} XYZ → ABC
An exemplary error demo p
XYZ - ABC {{error|An exemplary error demo strong|tag=strong}} XYZ → ABC An exemplary error demo strong XYZ
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools.
Error
The template returns a state of error (recognized as such by a wiki parser function), and an error-message text in red (visible for the user).
Parameter | Description | Type | Status | |
---|---|---|---|---|
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 by the “#expr:”, “#invoke:”, etc. parser functions.
| String | optional |
Message | 1 message | Error message text in red | Content | required |
See also
Editors can experiment in this template’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this template.