Bean Validation (Jakarta Validation) declares constraints through annotations on fields: @NotNull, @NotBlank, @Size, @Min, @Email, @Pattern. In Spring, @Valid on a controller parameter triggers the check; invalid input throws MethodArgumentNotValidException, translated into a 400 response.
Example
record ClientDto(@NotBlank String nom, @Min(18) int age) {}