Skip to main content
  • Log in
  • Manage Cookies
projects.eclipse.org
Download
  • Projects
  • Working Groups
  • Members
  • Community
    • Marketplace
    • Events
    • Planet Eclipse
    • Newsletter
    • Videos
    • Blogs
  • Participate
    • Report a Bug
    • Forums
    • Mailing Lists
    • Wiki
    • IRC
    • Research
  • Eclipse IDE
    • Download
    • Learn More
    • Documentation
    • Getting Started / Support
    • How to Contribute
    • IDE and Tools
    • Newcomer Forum
  • More
      • Community

      • Marketplace
      • Events
      • Planet Eclipse
      • Newsletter
      • Videos
      • Blogs
      • Participate

      • Report a Bug
      • Forums
      • Mailing Lists
      • Wiki
      • IRC
      • Research
      • Eclipse IDE

      • Download
      • Learn More
      • Documentation
      • Getting Started / Support
      • How to Contribute
      • IDE and Tools
      • Newcomer Forum
  1. Home
  2. Projects
  3. Eclipse EE4J
  4. Jakarta Bean Validation

Jakarta Bean Validation

Primary tabs

  • Overview(active tab)
  • Downloads
  • Who's Involved
  • Developer Resources
  • Governance
  • Contact Us

Jakarta Bean 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 SE but is integrated in Java EE 6 and later; Bean Validation 2.0 is part of Java EE 8

E.g. like so:

public class User {

private String email;

@NotNull @Email
public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}
}

public class UserService {

public void createUser(@Email String email, @NotNull String name) {
// ...
}
}

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.

This project is part of Jakarta 10, Jakarta EE 9, and Jakarta EE 8.
Licenses: 
Apache License, Version 2.0
Latest Releases: 

From September 10th, 2019 to October 7th, 2020

NameDateReview
3.02020-10-07
2.02019-09-10
Active Member Companies: 
Member companies supporting this project over the last three months.
Contribution Activity: 
Commits on this project (last 12 months).
Specification: 
This Specification Project is affiliated with the Jakarta EE Working Group.
Contributors: 
Ivar Grimstad
Kevin Sutter
Jakarta Bean Validation

Project Links

  • Website

Related Projects

Project Hierarchy:

  • Eclipse EE4J
  • Jakarta Bean Validation

Tags

Technology Types
  • Cloud Native Java
  • Specification

Eclipse Foundation

  • About Us
  • Contact Us
  • Donate
  • Members
  • Governance
  • Code of Conduct
  • Logo and Artwork
  • Board of Directors

Legal

  • Privacy Policy
  • Terms of Use
  • Copyright Agent
  • Eclipse Public License
  • Legal Resources

Useful Links

  • Report a Bug
  • Documentation
  • How to Contribute
  • Mailing Lists
  • Forums
  • Marketplace

Other

  • IDE and Tools
  • Projects
  • Working Groups
  • Research@Eclipse
  • Report a Vulnerability
  • Service Status

Copyright © Eclipse Foundation. All Rights Reserved.

Back to the top