We're updating the issue view to help you get more done. 

Support for non-standard Java beans

Description

I see more and more projects start using code generators for their entities. Here are some libraries which generate java code:

  1. Immutables

  2. AutoValue

  3. FreeBuilder

They all seem to adopt direct name accessors instead of getters (from Java Beans):

Example

1 2 3 4 5 6 7 8 9 public interface Entity { @NotBlank String name(); // instead of getName(); @Min(16) int age(); // instead of getAge(); }

It seems that hibernate validator still requires POJOs to follow java bean convention. Having standard getName() / getAge() works just fine.

Is it currently possible to plug custom method name resolution with Validator ?

Environment

None

Status

Assignee

Marko Bekhta

Reporter

Andrei

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Blocker