Module:IsValidPageName
From ERPC Wiki Archive
Revision as of 06:23, 2 April 2014 by Mr. Stradivarius (talk) (use pcall in case we are over the expensive function count)
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