# Enter verification code from email. Input min & max value constraint not working

**URL:** <https://forum.bubble.io/t/enter-verification-code-from-email-input-min-max-value-constraint-not-working/394424>\
**Category:** Mobile\
**Created:** [April 7, 2026, 7:43am UTC](https://forum.bubble.io/t/enter-verification-code-from-email-input-min-max-value-constraint-not-working/394424 "2026-04-07T07:43:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehijiagboneclement](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ehijiagboneclement/32/157776_2.png) [@ehijiagboneclement](https://forum.bubble.io/u/ehijiagboneclement)\
**Post date:** [April 7, 2026, 7:43am UTC](https://forum.bubble.io/t/enter-verification-code-from-email-input-min-max-value-constraint-not-working/394424/1 "2026-04-07T07:43:18Z")

</div>

I am trying to create an interface where the user can only enter a single number inside an input. I have added four inputs for the four digit codes. I have two challenges, I need to know how to restrict each input to only accept one number and I also need to know the workflow to generate the email 4 digit code. I am using postmark

 ![Screenshot 2026-04-07 at 8.36.12 am](https://us1.discourse-cdn.com/bubble/original/4X/5/0/c/50cb11170f4c314751e9b922d3721472740e56de.jpeg)

 ![Screenshot 2026-04-07 at 8.35.30 am](https://us1.discourse-cdn.com/bubble/original/4X/2/e/2/2e2207ca3352f1adca6e07bbc141953ba40f67a2.png)

---

<div class="post-metadata">

**Author:** ![dev.goldenaxe](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dev.goldenaxe/32/250295_2.png) [@dev.goldenaxe](https://forum.bubble.io/u/dev.goldenaxe)\
**Post date:** [April 7, 2026, 9:23am UTC](https://forum.bubble.io/t/enter-verification-code-from-email-input-min-max-value-constraint-not-working/394424/2 "2026-04-07T09:23:17Z")

</div>

Hey! You’re hitting two separate things here - let me address the first one.

The **min/max value** constraint controls the _numeric range_ of the value (e.g., must be between 0 and 9), not how many characters the user can type. That’s why it isn’t working.

Here’s the correct approach:

1. Select one of your digit Input elements and open its property editor.

2. Under the **Appearance** tab, set **Content format** to **“Text (numbers only)”**.

3. Check the **“Limit the number of characters”** checkbox.

4. Set **Maximum number** to **1**.

Repeat for all four inputs. This hard-stops the user from typing more than one digit per box, while still triggering the numeric keyboard on mobile.

---

<div class="post-metadata">

**Author:** ![dev.goldenaxe](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dev.goldenaxe/32/250295_2.png) [@dev.goldenaxe](https://forum.bubble.io/u/dev.goldenaxe)\
**Post date:** [April 7, 2026, 9:29am UTC](https://forum.bubble.io/t/enter-verification-code-from-email-input-min-max-value-constraint-not-working/394424/3 "2026-04-07T09:29:10Z")

</div>

For Random string generating for your email - Use Bubble’s **Calculate Formula** function to generate a random 4-digit string.

 ![image](https://us1.discourse-cdn.com/bubble/original/4X/4/f/c/4fc739506aafc982db68760e186a535232082ee6.png)

---

<div class="post-metadata">

**Author:** ![ehijiagboneclement](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ehijiagboneclement/32/157776_2.png) [@ehijiagboneclement](https://forum.bubble.io/u/ehijiagboneclement)\
**Post date:** [April 7, 2026, 10:13am UTC](https://forum.bubble.io/t/enter-verification-code-from-email-input-min-max-value-constraint-not-working/394424/4 "2026-04-07T10:13:21Z")

</div>

This worked for ensuring one max number. Thank you. However for a smoother UX, I want to automatically set focus to the next input as soon as the first digit is entered in input 1. for example if the code is 4321, the user should be able to enter all four without having to tap on all inputs to set focus. Is this achievable ?

---

<div class="post-metadata">

**Author:** ![dev.goldenaxe](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dev.goldenaxe/32/250295_2.png) [@dev.goldenaxe](https://forum.bubble.io/u/dev.goldenaxe)\
**Post date:** [April 7, 2026, 10:26am UTC](https://forum.bubble.io/t/enter-verification-code-from-email-input-min-max-value-constraint-not-working/394424/5 "2026-04-07T10:26:54Z")

</div>

For each input, create a workflow using the **“Do when condition is true”** event and set condition as `Input A's value:count = 1` and have the action to Set focus → Input B. Repeat the same for all inputs to shift focus from one to another.

 ![image](https://us1.discourse-cdn.com/bubble/original/4X/f/0/b/f0be2eb32d612dcd9e31326f0a4bb1591450badc.png)

---

<div class="post-metadata">

**Author:** ![ehijiagboneclement](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ehijiagboneclement/32/157776_2.png) [@ehijiagboneclement](https://forum.bubble.io/u/ehijiagboneclement)\
**Post date:** [April 7, 2026, 11:51am UTC](https://forum.bubble.io/t/enter-verification-code-from-email-input-min-max-value-constraint-not-working/394424/6 "2026-04-07T11:51:42Z")

</div>

This worked. Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [May 7, 2026, 11:51am UTC](https://forum.bubble.io/t/enter-verification-code-from-email-input-min-max-value-constraint-not-working/394424/7 "2026-05-07T11:51:43Z")

</div>

Closed on May 7, 2026, 11:51am UTC

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