साँचा:Error/doc
{{
साँचा:namespace detect
| type = notice
| image =
| imageright =
| class =
| style = margin-bottom:1.0em;
| textstyle =
| text = साँचा:strong for साँचा:terminate sentence
It contains usage information, categories and other content that is not part of the original साँचा page.
| small =
| smallimage =
| smallimageright =
| smalltext =
| subst =
| date =
| name =
}}
साँचा: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
- साँचा:tlx → साँचा:error
- साँचा:tlx → साँचा:error
- Compare, used in a Parser Function:
{{#expr:Foo}}
→ एक्स्प्रेशन त्रुटि: अज्ञात शब्द "foo"। {{#iferror:{{error|Foo}} | {{y}} | {{n}} }}
→ साँचा:n
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 साँचा:pf parser function. It defaults to strong
, the tag generated e.g. by साँचा:pf. To prevent strong
message, use one of the other tags, e.g. tag=span
.
- ABC साँचा:tlx XYZ → ABC साँचा:error XYZ
- ABC साँचा:tlx XYZ → ABC साँचा:error XYZ
- ABC साँचा:tlx XYZ → ABC साँचा:error XYZ
- ABC साँचा:tlx XYZ → ABC साँचा:error XYZ
- ABC साँचा:tlx XYZ → ABC साँचा:error 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)
प्राचल | वर्णन | प्रकार | स्थिति | |
---|---|---|---|---|
Message | 1 | Error message text in red | स्ट्रिंग | वैकल्पिक |
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 #expre
| स्ट्रिंग | वैकल्पिक |
See also