jakartaee / jakartaee/validation

ConstraintValidator about why is passed ConstraintValidatorContext isValid method, ValidationContext is not

Open
#223 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
163
Forks
67
Avg merge
3d 15h
Merged PRs (30d)
2

Description

I want to implement a custom annotation check function, check two related fields, based on the value of another field to determine whether this field should be checked as empty, but now I can not get the whole check object, so I can not achieve this custom check, I would like to ask, why the design is like this

![image](https://github.com/user-attachments/assets/84ee5121-718d-4c98-bfb5-11459e85c427)
version jakarta.validation.validation-api 3.1.0

Contributor guide

Open the contributing guide

Research direction

Start with the ConstraintValidator.isValid method and ConstraintValidatorContext in jakarta.validation.validation-api 3.1.0, then compare them with the requested ValidationContext access. Determine whether the API design supports checking related fields and whether the issue calls for a documented rationale or an API change.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.