Skip to content
Advertisement

Custom validation with javax.validation

I’m trying to make a custom java validation annotation and returns me

Request processing failed; nested exception is javax.validation.ConstraintDeclarationException: HV000144: Cross parameter constraint com.my.company.CustomConstraint is illegally placed on field ‘private java.util.List com.my.company.ElementOfTheList’.”

the code is really naive

JavaScript
JavaScript

And in the rest object model

JavaScript

Advertisement

Answer

change

JavaScript

to

JavaScript

since you want to validate and element (here is List list) and not the parameters of a method or a constructor

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement