Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 812 Bytes

README.md

File metadata and controls

21 lines (13 loc) · 812 Bytes

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.