# How can I use a custom predicate to validate multiple fields?

**URL:** <https://discourse.dry-rb.org/t/how-can-i-use-a-custom-predicate-to-validate-multiple-fields/184>\
**Category:** dry-validation\
**Created:** [December 26, 2016, 7:24pm UTC](https://discourse.dry-rb.org/t/how-can-i-use-a-custom-predicate-to-validate-multiple-fields/184 "2016-12-26T19:24:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericgross](https://avatars.discourse-cdn.com/v4/letter/e/57b2e6/32.png) [@ericgross](https://discourse.dry-rb.org/u/ericgross)\
**Post date:** [December 26, 2016, 7:24pm UTC](https://discourse.dry-rb.org/t/how-can-i-use-a-custom-predicate-to-validate-multiple-fields/184/1 "2016-12-26T19:24:20Z")

</div>

I have an address form that I want to validate as a whole rather than validating each input on its own. I can only tell if the address is valid by passing the line1, city, state, zip to the custom predicate method so that it can check them as a unit.

How can I do this? I only see how to validate individual fields.
