Jakarta Bean Validation

Josh Juneau, Tarun Telang · Apress eBooks · 2022

One of the most important pieces of any data-driven application is data validation. It is imperative that one validates data before it is inserted into a database to maintain integrity. There are many reasons to validate, the most important being security purposes, data consistency, and proper formatting. Many web applications use validation in the presentation layer via JavaScript for validation of form data and in the persistence layer. However, sometimes JavaScript can become problematic in that the code can become unwieldy, and there is also no guarantee that it will execute. It is oftentimes found to be a good idea to perform validation within the domain model, although this can cause code clutter.

Read the paper · More papers on PaperTik