Not sure how to do it with Unreal Engine's stuff specifically, but the logic is pretty simple. Just create a function that takes in the value, a minimum value, a maximum value, and use if statements to return the proper value. Here's the gist in C++ that you should be able to copy and paste and use directly in UE4:
double Clamp(double value, double min, double max) {
if (value < min) value = min;
if (value > max) value = max;
return value;
}