Code Explainers

Code explainers tagged #custom-constraints

java
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = PasswordsMatchValidator.class)
public @interface PasswordsMatch {

Custom cross-field validation in Spring

bean-validation custom-constraints cross-field-validation
Intermediate 8 steps