• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Is valid page name/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Is valid page name
This is the template sandbox page for Template:Is valid page name (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 3,100 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template uses Lua:
  • Module:Page (sandbox)

This template returns "valid" if the given page title is valid, or the empty string otherwise. The page does not need to exist in order for the template to return "valid". As a convenience, the template treats "-" as an invalid page title.

Usage

edit
{{#if:
   {{{1|}}} |
   {{#if:
     {{Is valid page name|{{{1}}}}} |
     [[{{{1}}}]] |
     {{{1}}}
   }}
 }}

Examples

edit
  • {{Is valid page name|Main Page}} returns "valid"
  • {{Is valid page name|[[Main Page]]}} returns ""
  • {{Is valid page name|This page could not POSSIBLY exist, could it?}} returns "valid"
  • {{Is valid page name|-}} returns "" (even though "-" can exist)
  • {{Is valid page name}} returns ""

See also

edit
  • {{isValidPageName}} at the English Wiktionary
The above documentation is transcluded from Template:Is valid page name/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Is_valid_page_name/sandbox&oldid=1264684568"
Last edited on 23 December 2024, at 00:34

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 23 December 2024, at 00:34 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop