Empty validatedBy in @Constraint

后端 未结 2 780
长情又很酷
长情又很酷 2021-02-04 03:11

I noticed that all built-in constraints have an empty value for the validatedBy parameter in @Constraint. i.e. @Constraint(validatedBy = {})

2条回答
  •  不要未来只要你来
    2021-02-04 03:30

    Those built-in are treated in special implementation-specific way and their validators are configured programmatically.

    For Hibernate Validator it's done in ConstraintHelper.java. I think you can't achieve the same for your custom constraints.

提交回复
热议问题