Well I'm not entirely sure if limit is the right name for it but that's how I always thought of it.
I found it first in Zodiac's initial code by Yen, it looked something like this.
PHP Code:
function limit(val, min, max) {
if (val < min) return min;
else if (val > max) return max;
else return val;
}
But it's come in handy for me when I am validating quantities i.e:
temp.donation = limit(temp.value, 0, player.rupees)
Or other statistic related code.