# Verify possible fat fingered phone number

**URL:** <https://discourse.nodered.org/t/verify-possible-fat-fingered-phone-number/42906>\
**Category:** General\
**Created:** [19 March 2021 22:23 UTC](https://discourse.nodered.org/t/verify-possible-fat-fingered-phone-number/42906 "2021-03-19T22:23:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tvan0076](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tvan0076/32/34437_2.png) [@tvan0076](https://discourse.nodered.org/u/tvan0076)\
**Post date:** [19 March 2021 22:23 UTC](https://discourse.nodered.org/t/verify-possible-fat-fingered-phone-number/42906/1 "2021-03-19T22:23:54Z")

</div>

Does anyone have any suggestions for checking a phone number for a possible fat-finger? I have the OG phone number and a second number that could be either a possible fat fingered one or the person really changed their phone number. How could I compare them, and have code decide if the number truly changed or if was fat-fingered? Maybe break up the number in chunks (xxx-xxx-xxxx) and if 2 of 3 chunks match up then call it a fat-finger number? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 March 2021 07:36 UTC](https://discourse.nodered.org/t/verify-possible-fat-fingered-phone-number/42906/2 "2021-03-20T07:36:12Z")

</div>

> [@tvan0076](#):
>
> OG phone number

What is an OG phone number?

You don't seem to have enough digits in your phone number for the general case, mine is 11 digits or 12 with the country code.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [20 March 2021 08:42 UTC](https://discourse.nodered.org/t/verify-possible-fat-fingered-phone-number/42906/3 "2021-03-20T08:42:34Z")

</div>

> [@Colin](#):
>
> What is an OG phone number?

Street slang Colin, [Urban Dictionary: OG](https://www.urbandictionary.com/define.php?term=OG)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 March 2021 09:39 UTC](https://discourse.nodered.org/t/verify-possible-fat-fingered-phone-number/42906/4 "2021-03-20T09:39:25Z")

</div>

Thanks. I don't believe I have come across that before.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [20 March 2021 09:42 UTC](https://discourse.nodered.org/t/verify-possible-fat-fingered-phone-number/42906/5 "2021-03-20T09:42:32Z")

</div>

Simplest method would be to compare how many digits are not the same

```auto
const OG = "07983777234";
msg.payload = msg.payload.split("").filter((e, i) => OG[i] !== e).length;
return msg;

```

0 - number the same  
1 - one digit different  
2 - 2 digits different etc

you could take it further and compare the digits that are different, and find how far form the OG digit they are on the keyboard.

---

<div class="post-metadata">

**Author:** ![tvan0076](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tvan0076/32/34437_2.png) [@tvan0076](https://discourse.nodered.org/u/tvan0076)\
**Post date:** [20 March 2021 17:32 UTC](https://discourse.nodered.org/t/verify-possible-fat-fingered-phone-number/42906/6 "2021-03-20T17:32:01Z")

</div>

E1cid great thought! Thanks for sharing!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 April 2021 17:32 UTC](https://discourse.nodered.org/t/verify-possible-fat-fingered-phone-number/42906/7 "2021-04-03T17:32:01Z")

</div>

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