Skip to content
Example showing how to apply Bean Validation constraints to the components of Java 14 record types
Java Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE.txt
README.md
jshell-with-classpath.sh
pom.xml
records-bean-validation.gif

README.md

Enforcing Java 14 Record Invariants with Bean Validation

Example code accompanying the blog post "Enforcing Java Record Invariants With Bean Validation". It shows how to apply Bean Validation constraints to the components of record types and automatically validate them upon constructor invocation, by means of injecting logic for invoking Bean Validation's method validation API and raising an exception in case of any violations.

Enforcing Java 14 Record Invariants with Bean Validation

Build

Run the following to build this project:

export MAVEN_OPTS="--enable-preview"
mvn clean package

License

This code base is available ander the Apache License, version 2.

You can’t perform that action at this time.