Jakarta Validation is a specification which
-
lets you express constraints on object models via annotations
-
lets you write custom constraints in an extensible way
-
provides the APIs to validate objects and object graphs
-
provides the APIs to validate parameters and return values of methods and constructors
-
reports the set of violations (localized)
-
runs on Java and is integrated in Jakarta EE (but does not require it): Jakarta Validation 3.0 is part of Jakarta EE 9 and 10.
While you can run validation manually, it is more natural to let other specifications and frameworks validate data at the right time (user input in presentation frameworks, business service execution by CDI, entity insert or update by JPA).
In other words, run once, constrain anywhere.
The content of this open source project is received and distributed under the license(s) listed above. Some source code and binaries may be distributed under different terms. Specific license information is provided in file headers and in NOTICE files distributed with the project's binaries.
Member companies supporting this project over the last three months.