function t.numberConstrained(i,E)assert(t.number(i))assert(t.number(E))local J=t.numberMin(i)local e=t.numberMax(E)return function(i)local E,m=J(i)if not E then return false,m or""end local O,K=e(i)if not O then return false,K or""end return true end end

function t.numberConstrained(min, max)
	assert(t.number(min))
	assert(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
