function t.numberConstrained(N,H)assert(t.number(N)and t.number(H))local W=t.numberMin(N)local r=t.numberMax(H)return function(N)local H,a=W(N)if not H then return false,a or""end local g,X=r(N)if not g then return false,X or""end return true end end

function t.numberConstrained(min, max)
	assert(t.number(min) and t.number(max))
	local minCheck = t.numberMin(min)
	local maxCheck = t.numberMax(max)

	return function(value)
		local minSuccess, minErrMsg = minCheck(value)
		if not minSuccess then
			return false, minErrMsg or ""
		end

		local maxSuccess, maxErrMsg = maxCheck(value)
		if not maxSuccess then
			return false, maxErrMsg or ""
		end

		return true
	end
end
