Module:Wp/khw/IsValidPageName

From Wikimedia Incubator

Usage[edit source]

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".

{{#invoke:Wp/khw|isValidPageName|a potential page name}}



-- 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 "موعته‌بر اینت"
	else
		return ""
	end
end

return export