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

Cellphone required does not require valid phone number #38

Open
Laaknor opened this issue Apr 13, 2018 · 1 comment
Open

Cellphone required does not require valid phone number #38

Laaknor opened this issue Apr 13, 2018 · 1 comment

Comments

@Laaknor
Copy link
Member

Laaknor commented Apr 13, 2018

Tested with userinfo_cellphone_required activated, could register with the cellphone number "hei". Should be only numbers, without spaces or +.

@hultberg
Copy link
Member

Only norwegian phone numbers? We could use the following regex to check the string: /^(\+?[0-9]{1,2})?[0-9]{8,}$/. It would at least match a norwegian number, and a minimum of 8 length in the number. It would not really respect foreign lengths based on the country code, but its a simple check.

Demo & test: https://3v4l.org/rQ8kk

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

No branches or pull requests

2 participants