# Custom dry type with multiple constraints

**URL:** <https://discourse.dry-rb.org/t/custom-dry-type-with-multiple-constraints/951>\
**Category:** dry-types\
**Created:** [November 14, 2019, 12:45am UTC](https://discourse.dry-rb.org/t/custom-dry-type-with-multiple-constraints/951 "2019-11-14T00:45:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![solnic](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/solnic/32/779_2.png) [@solnic](https://discourse.dry-rb.org/u/solnic)\
**Post date:** [December 6, 2019, 10:36am UTC](https://discourse.dry-rb.org/t/custom-dry-type-with-multiple-constraints/951/2 "2019-12-06T10:36:33Z")

</div>

I’d recommend using contract rules for that. Such complex types can be used for coercion purposes but not for validation error messages.

---

_[View the full topic](https://discourse.dry-rb.org/t/custom-dry-type-with-multiple-constraints/951)._
