<Compile time error when using javax.validation.Co...
# forum
r
Compile time error when using javax.validation.Constraint with generics in Kotlin A reusable constraint validator checks length of an array shown below along with a filter. @Target(AnnotationTarget.FIELD) @Retention(AnnotationRetention.RUNTIME) @Constraint(validatedBy = [MaxSizeListItemValidator::class]) annotation class MaxSizeListItem( val groups: Array = [], val message: String = "{com.example.validations.MaxSizeListItem}", val optional: Boolean = false, val options: Array = [], val payload: Array = [], val value: Int, ) class...