# Possible to have mandatory additionalSignUpField based on another field?

**URL:** <https://community.auth0.com/t/possible-to-have-mandatory-additionalsignupfield-based-on-another-field/11311>\
**Category:** Get Help\
**Tags:** lock, auth0\
**Created:** [May 2, 2018, 11:32am UTC](https://community.auth0.com/t/possible-to-have-mandatory-additionalsignupfield-based-on-another-field/11311 "2018-05-02T11:32:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smarajitdasgupta](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/smarajitdasgupta/32/8767_2.png) [@smarajitdasgupta](https://community.auth0.com/u/smarajitdasgupta)\
**Post date:** [May 2, 2018, 11:32am UTC](https://community.auth0.com/t/possible-to-have-mandatory-additionalsignupfield-based-on-another-field/11311/1 "2018-05-02T11:32:33Z")

</div>

In Lock v11 additionalSignUpFields, is it possible to make a mandatory additional signup text field validate if a checkbox is checked?

So, the text field needs to have a valid value unless the checkbox is checked.

Use case: Post / zip code field needs to be filled and be a 4 digit value and is mandatory for submission unless the user indicates they are from a different country by checking the checkbox.

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [May 22, 2018, 7:52pm UTC](https://community.auth0.com/t/possible-to-have-mandatory-additionalsignupfield-based-on-another-field/11311/2 "2018-05-22T19:52:38Z")

</div>

👋 @smarajitdasgupta we could possibly use an optional `checkfield box` as described [here](https://auth0.com/docs/libraries/lock/v10/configuration#checkbox-field) and implement a client-side `validator`, an example is [here](https://auth0.com/docs/libraries/lock/v10/configuration#text-fields) . So, we can design the logic that if we know the user needs to indicate a post/zip code to provide a hint stating they need to enter (if they haven’t), else return true.

[https://auth0.com/docs/libraries/lock/v10/configuration#text-fields](https://auth0.com/docs/libraries/lock/v10/configuration#text-fields)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 27, 2019, 12:10pm UTC](https://community.auth0.com/t/possible-to-have-mandatory-additionalsignupfield-based-on-another-field/11311/3 "2019-08-27T12:10:43Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
