Skip to content
Markus Hager edited this page Jun 8, 2018 · 2 revisions

The main concept of using lambda combined with a fluent interface is from Joel Planes, what can be found here.

Goals

  • simple reusable API for validation (use of the fluent interface)
  • extendable by custom validations without the need of forking this repo
  • prefer java control structure against complex configuration, what gives quite more flexibility e.g. for caching of objects which needs to be fetched from somewhere
  • validators should be usable in dependency-injection environments
  • for legacy systems it should be possible to use error codes for each single validation
  • setup validation once, execute it many times for different objects
  • possibility to fail fast on error

Why just another validation library?

Why not using

javax Bean validation

Because I need different validation for the same object type, depending on the business workflow

I thought its too complex to use. I would like to use it easier without that someone is overwhelmed by how to use it.

  • I was afraid of the chinese documentation of the api.
  • I wanted to have more control
    • at which step a validation is executed
    • if a validation is executed

I did not like to have a fluent interface for the setting up the validation, while I can't use it because I have a restriction if a validation should be executed.

Clone this wiki locally