# Validating objects that need to be dependency injected

**URL:** <https://discourse.hibernate.org/t/validating-objects-that-need-to-be-dependency-injected/1674>\
**Category:** Hibernate Validator\
**Created:** [November 8, 2018, 3:52pm UTC](https://discourse.hibernate.org/t/validating-objects-that-need-to-be-dependency-injected/1674 "2018-11-08T15:52:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![baj](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@baj](https://discourse.hibernate.org/u/baj)\
**Post date:** [November 8, 2018, 3:52pm UTC](https://discourse.hibernate.org/t/validating-objects-that-need-to-be-dependency-injected/1674/1 "2018-11-08T15:52:54Z")

</div>

We have objects that live inside an AMF layer and through the application layer code, we are attempting to validate names using custom annotations; however, we are not using any dependency injection tools (as everything needs to be custom) and currently wondering how to fetch a name attribute value from the other layer. Are there any Hibernate functionalities that allow this?

---

<div class="post-metadata">

**Author:** ![gsmet](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/gsmet/32/9_2.png) [@gsmet](https://discourse.hibernate.org/u/gsmet)\
**Post date:** [November 28, 2018, 10:17pm UTC](https://discourse.hibernate.org/t/validating-objects-that-need-to-be-dependency-injected/1674/3 "2018-11-28T22:17:40Z")

</div>

I’m not sure I understand what you’re trying to do? Could you explain it a bit more and maybe add an example?
