OriginProtocol / origin-bridge

We've moved to a monorepo: https://github.com/OriginProtocol/origin/tree/master/infra/bridge
MIT License
15 stars 7 forks source link

Normalize and validate phone number #40

Closed ambertch closed 6 years ago

ambertch commented 6 years ago
  1. Phone numbers are stored in raw form in the database, we may want to normalize the phone numbers (also, international numbers will be of a different format than US ones)

bridge-server=# select * from verification_code;

 1111111111   | xxxxxx | 2018-05-03 20:01:57.918381-07 | 2018-05-03 17:35:03.905656-07 | 2018-05-03 19:31:57.914476-07 | 
 111-111-1111 | xxxxxx | 2018-05-03 20:11:57.733595-07 | 2018-05-03 19:32:24.828584-07 | 2018-05-03 19:41:57.727545-07 | 
  1. There currently isn't an application level validation or database constraint on the phone number field:

absdsssjkddskjf | xxxxxx | 2018-05-03 20:17:13.273304-07 | 2018-05-03 19:47:13.271696-07 | 2018-05-03 19:47:13.271696-07 |

ambertch commented 6 years ago

taken care of by https://github.com/OriginProtocol/bridge-server/pull/48