function t.numberMax(i)return function(M)local Y,U=t.number(M)if not Y then return false,U end if M<=i then return true else return false,string.format("\110\117\109\098\101\114 \060\061 \037\100 \101\120\112\101\099\116\101\100\044 \103\111\116 \037\100",i,M)end end end
--[[**
	ensures value is a number where value <= max

	@param max The maximum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberMax(max)
	return function(value)
		local success, errMsg = t.number(value)
		if not success then
			return false, errMsg
		end
		if value <= max then
			return true
		else
			return false, string.format("number <= %d expected, got %d", max, value)
		end
	end
end
