Module:IsValidPageName

Revision as of 22:01, 23 January 2021 by imported>Fire (ページの作成:「-- このModuleは Template:IsValidPageName の実体です。 local export = {} function export.isValidPageName(frame) local success, res = pcall(mw.titl…」)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

-- このModuleは [[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