# Unique values validation

**URL:** <https://forum.bubble.io/t/unique-values-validation/110747>\
**Category:** Need help\
**Created:** [September 9, 2020, 8:17pm UTC](https://forum.bubble.io/t/unique-values-validation/110747 "2020-09-09T20:17:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![philledille](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/philledille/32/6558_2.png) [@philledille](https://forum.bubble.io/u/philledille)\
**Post date:** [September 15, 2020, 10:51am UTC](https://forum.bubble.io/t/unique-values-validation/110747/3 "2020-09-15T10:51:12Z")

</div>

Maybe this could help:

> [@Creating a unique field that is not the User.Email or Unique ID](http://forum.bubble.io/t/creating-a-unique-field-that-is-not-the-user-email-or-unique-id/111270):
>
> Hi, I needed to create a unique field that is not the unique ID of the row on the table, i.e. a human-readable referral code my users can pass on to others, in the format user name+5 digits. To first search to see if the code is used and if not, add it could, yes the chance being slim, lead to duplicates. So I came up with this process: Generate code Store the code in the DB. Check if the code is used \>1 time. If so, goto 1. Mark this Users code as unique and never do this loop again for thi…

Cheers, Peter

---

_[View the full topic](https://forum.bubble.io/t/unique-values-validation/110747)._
