Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify phone number input in contact form #3381

Open
Tracked by #2955
MizukiTemma opened this issue Jan 30, 2025 · 2 comments
Open
Tracked by #2955

Verify phone number input in contact form #3381

MizukiTemma opened this issue Jan 30, 2025 · 2 comments
Assignees
Labels
enhancement This improves an existing feature
Milestone

Comments

@MizukiTemma
Copy link
Member

MizukiTemma commented Jan 30, 2025

Motivation

Users can register a phone number in each contact. This field is currently CharField and there is no guarantee/check that the input value is valid as phone number.

Proposed Solution

  • Decide what kind of input we accept. A phone number can be written in many ways: 0123456789, +49123456789, 0123/45679, 0123-456789, etc. we should take into consideration how the phone numbers are currently automatically formatted in the description field of contents. Convert contact phone numbers to international format #3383
  • Show an error message if anything not acceptable is given in the field before saving (for example, string).

Alternatives

Leave as it is.

User Story

Additional Context

Design Requirements

Related Issues

@MizukiTemma MizukiTemma added the feature New feature or request label Jan 30, 2025
@MizukiTemma MizukiTemma changed the title Valify input is valid as phone number in contact form Valify phone number input in contact form Jan 30, 2025
@JoeyStk JoeyStk added this to the Next-up milestone Feb 4, 2025
@JoeyStk JoeyStk added enhancement This improves an existing feature and removed feature New feature or request labels Feb 4, 2025
@MizukiTemma MizukiTemma self-assigned this Feb 5, 2025
@MizukiTemma MizukiTemma changed the title Valify phone number input in contact form Verify phone number input in contact form Feb 7, 2025
@MizukiTemma
Copy link
Member Author

@JoeyStk
Do you think this is still needed after #3383 ?

@JoeyStk
Copy link
Contributor

JoeyStk commented Feb 7, 2025

I don't know yet, because we get an AttributeError when inputting any kind of phone number (0123456789, +49123456789). It says:
'Settings' object has no attribute 'DEFAULT_PHONE_NUMBER_COUNTRY_CODE'. I must have missed this during my review of the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This improves an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants