Range
Validates that a numeric field is within the given inclusive range.
The annotation applies to Byte, Short, Int, Long, Float, and Double values.
Example:
data class MyConfig(
@Range(min = 1, max = 65535) val port: Int = 8080
)Content copied to clipboard