Skip to content

Country code is re-added if phone number is wrong length #180

@milesmatthias

Description

@milesmatthias

A perfectly valid response to this is that it's the application's responsibility, but I think it could be a nice option here.

We have US & Australian users, and if an Australian user puts in a phone number that is longer than 9 digits (ie: an American doing Australian testing, so they put in their 10 digit US number), phony_rails re-adds the country code (+61 in the case of Australia) to the phone number every time the user record is saved.

So we ended up with a couple user records with super long phone numbers (+61616161616161615555555555).

It'd be great if there was a config option for how to handle this situation that phony_rails just handled. Ex: truncate first 9 digits, truncate last 9 digits, etc. Or maybe there is, and I just missed it in the docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions