# Enterprise form custom validator based on another field

**URL:** <https://community.bloomreach.com/t/enterprise-form-custom-validator-based-on-another-field/2214>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [November 5, 2020, 7:48am UTC](https://community.bloomreach.com/t/enterprise-form-custom-validator-based-on-another-field/2214 "2020-11-05T07:48:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navid\_M](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/navid_m/32/438_2.png) [@Navid\_M](https://community.bloomreach.com/u/Navid_M)\
**Post date:** [November 5, 2020, 7:48am UTC](https://community.bloomreach.com/t/enterprise-form-custom-validator-based-on-another-field/2214/1 "2020-11-05T07:48:29Z")

</div>

I am trying to create a custom validator for eform field. This validator needs to work based on the value from previous field(example, phone number and confirm phone number filed). I am referring:

> **[Custom Validation Rules - Bloomreach Experience Manager - The Fast and...](https://xmdocumentation.bloomreach.com/12/library/enterprise/enterprise-features/enterprise-forms/custom-validation-rules.html)**
>
> The fast and flexible on-premise or PaaS headless CMS

In code, how do I refer another field from same form and same group to achieve this?
