Java EE 8 Cookbook
上QQ阅读APP看书,第一时间看更新

Using Bean Validation for data validation

You can use Bean Validation to constrain your data in many different ways. In this recipe, we are going to use it to validate a JSF form, so we can validate it as soon as the user tries to submit it, and avoid any invalid data right away.