Jump to content

Module:Params/doc/examples/check for unknown parameters/doc

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Grufo (talk | contribs) at 19:31, 26 September 2024 (Update the documentation). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

This example template shows to use {{#invoke:params|discarding|...}} to check for unknown parameters.

Usage

[edit]

For instance, writing

{{module:params/doc/examples/check for unknown parameters
	| hello = world
	| wind = surfing
}}

will generate

Everything is good: do something

while writing

{{module:params/doc/examples/check for unknown parameters
	| hello = world
	| wind = surfing
	| wrong = ups!
}}

will generate

Error: The only parameters accepted are |hello= and |wind=.

For simple cases like this specialized modules are available; you might want to have a look at: