function t.values(g)assert(t.callback(g))return function(q)local N,P=t.table(q)if N==false then return false,P or""end for q,N in q do local t,P=g(N)if t==false then return false,string.format("\098\097\100 \118\097\108\117\101 \102\111\114 \107\101\121 \037\115\058\n\t\037\115",tostring(q),P or"")end end return true end end
--[[**
	ensures all values in given table pass check

	@param check The function to use to check the values

	@returns A function that will return true iff the condition is passed
**--]]
function t.values(check)
	assert(t.callback(check))
	return function(value)
		local tableSuccess, tableErrMsg = t.table(value)
		if tableSuccess == false then
			return false, tableErrMsg or ""
		end

		for key, val in value do
			local success, errMsg = check(val)
			if success == false then
				return false, string.format("bad value for key %s:\n\t%s", tostring(key), errMsg or "")
			end
		end

		return true
	end
end
