<How to prohibit accepting values other than true ...
# stackoverflow
u
How to prohibit accepting values other than true and false in request for Kotlin Spring Boot what decorator can I put on the class field so that values other than true and false are not accepted in the request. now any values can go into the request, including boolean. I can send false, 0 and an empty string - it will be interpreted as false. I can send true, all positive and negative numbers and it will be interpreted as true. what can I do to accept only true and false? open class KdInfo : Info { @Min(0) var brutto: Long = 0 @NotNull var isRefund: Boolean = false...