Module:IsValidPageName

From Xomnipedia
Revision as of 23:10, 22 December 2021 by Antoniokf5 (talk | contribs) (1 revision imported from templatewiki:Module:IsValidPageName)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:IsValidPageName/doc

-- This module implements [[Template:isValidPageName]].

local export = {}

function export.isValidPageName(frame)
	local success, res = pcall(mw.title.new, frame.args[1])
	if success and res then
		return "valid"
	else
		return ""
	end
end

return export