Outputs an error message in red into the page and adds the page to Category:Pages using formatting templates incorrectly. An anchor (FormattingError) is inserte
| This is a documentation subpage for Template:Formatting error. It may contain usage information, categories and other content that is not part of the original template page. |
Outputs an error message in red into the page and adds the page to Category:Pages using formatting templates incorrectly. An anchor (FormattingError) is inserted at the start of the error message, so you can find any errors on a page easily by adding #FormattingError at the end of the URL (e.g. Template:val/test#FormattingError). Used in complex templates that check their arguments for validity, so incorrect use can be spotted while editing a page or afterwards.
or
When using the nocategory argument, the error message is displayed as usual, but the page is not added to Category:Pages using formatting templates incorrectly. This is useful in documentation pages for templates that use FormattingError and show what errors they can generate without adding these documentation pages to the category. For an example of this, see {{LinkForElement}}.
This template can be evaluated using the {{#iferror}} parser function:
{{#iferror:{{val|XX}}|error|OK}} → error
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.