Actually, the @FloatRange documentation states:
Denotes that the annotated element should be a float or double in the given range
And a similar situation for @IntRange
Denotes that the annotated element should be an int or long in the given range
source
share