Restrict User Input in a Field to a certain range
I want to get user input in a certain line item related to number format but want to restrict the user input between 0 and 100. If the value input is between 0 to 100 then this value must be used as it is. But if the user input is <0 or >100 then it should return an error or must convert the value directly to the limit.
Summarised as follows:
User input = x
Case 1: if x >= 0 and x <= 100 then use x as it is.
Case 2: if x < 0 or x > 100 then either return an Error or change the value to x = 0(for x < 0) and x = 100(for x > 100).