メインメニューを開く

このモジュールについての説明文ページを モジュール:IsValidPageName/doc に作成できます

-- このモジュールは [[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