so first of all i could not think of a better title for this question so i\'m open for changes.
I am trying to validate a bean using the bean validation mechanism (JSR-3
Try adding ? like this:
?
data class User( @field:Valid @field:NotEmpty var roles: MutableSet<@NotNull Role?> = HashSet() )
Then the kotlin compiler should realise roles could be null, and it might honor the validation, I know little about JSR380 so i'm just guessing though.
null