Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/main/java/jakarta/validation/Constraint.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
*
* A constraint is both generic and cross-parameter if
* <ul>
* <li>two kinds of {@code ConstraintValidator}s are attached to the
* <li>two kinds of {@link ConstraintValidator}s are attached to the
* constraint, one targeting {@link ValidationTarget#ANNOTATED_ELEMENT}
* and one targeting {@link ValidationTarget#PARAMETERS},</li>
* <li>or if a {@code ConstraintValidator} targets both
* {@code ANNOTATED_ELEMENT} and {@code PARAMETERS}.</li>
* <li>or if a {@link ConstraintValidator} targets both
* {@link ValidationTarget#ANNOTATED_ELEMENT} and {@link ValidationTarget#PARAMETERS}.</li>
* </ul>
*
* Such dual constraints are rare. See {@link SupportedValidationTarget} for more info.
Expand All @@ -67,6 +67,9 @@
* }
* </pre>
*
* @see Payload
* @see ConstraintTarget
*
* @author Emmanuel Bernard
* @author Gavin King
* @author Hardy Ferentschik
Expand All @@ -79,13 +82,13 @@
/**
* {@link ConstraintValidator} classes implementing the constraint. The given classes
* must reference distinct target types for a given {@link ValidationTarget}. If two
* {@code ConstraintValidator}s refer to the same type, an exception will occur.
* {@link ConstraintValidator}s refer to the same type, an exception will occur.
* <p>
* At most one {@code ConstraintValidator} targeting the array of parameters of
* At most one {@link ConstraintValidator} targeting the array of parameters of
* methods or constructors (aka cross-parameter) is accepted. If two or more
* are present, an exception will occur.
*
* @return array of {@code ConstraintValidator} classes implementing the constraint
* @return array of {@link ConstraintValidator} classes implementing the constraint
*/
Class<? extends ConstraintValidator<?, ?>>[] validatedBy();
}