10

I once came across a validation framework for java, where you wrote one method that protected the integrity of the data-type and any CRUD operations on that data-type automatically called this method.

Does anyone know what this framework is? I simply want to avoid repetitive validation on every CRUD method attached to a data-type.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
bowsie
  • 1,275
  • 3
  • 15
  • 22

5 Answers5

13

Here's a huge list of Java Validation Libraries / Frameworks - http://java-source.net/open-source/validation

Eduard Wirch
  • 9,785
  • 9
  • 61
  • 73
Albert T. Wong
  • 602
  • 1
  • 6
  • 15
7

Apache Commons has a validation framework.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
duffymo
  • 305,152
  • 44
  • 369
  • 561
5

Are you using Hibernate for persistence? If you are, there is Hibernate Validator.

andref
  • 4,460
  • 32
  • 45
  • Hibernate Validator (or Bean Validation in general) is not tied to the Hibernate persistence framework (altough they work seamlessly together). – deamon Jul 27 '21 at 14:31
2

Spring has a very nice validation and binding API.

duffymo
  • 305,152
  • 44
  • 369
  • 561
2

Hibernate Validator, per adref's answer, is an implementation of JSR-303. Here's a helpful article to get you started if you are interested:

http://java.dzone.com/articles/bean-validation-and-jsr-303

twelve17
  • 688
  • 8
  • 20