Skip to main content

Bean Validation

  • Chapter
  • First Online:
Java EE 8 Recipes
  • 1994 Accesses

Abstract

One of the most important pieces of any data-using application is data validation. It is imperative that one validates data before it is inserted into a database in order to maintain integrity. There are a number of 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 also 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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Josh Juneau

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Juneau, J. (2018). Bean Validation. In: Java EE 8 Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3594-2_11

Download citation

Publish with us

Policies and ethics