We currently require users to enter a mobile phone number that is used for receiving notifications as text messages.

We've had multiple cases of people mistakenly entering their landline number instead, which is why we implemented a rather strict check for cellphone numbers (the country is France, in which all cellphone numbers start with known prefixes).

However, validating on a specific prefix feels wrong to me on some level, especially since some countries have no known cellphone number prefix.

  • I've also thought about displaying a warning text (e.g. "your phone number seems invalid, please double-check that it belongs to a mobile phone") without preventing the user from saving the form.
  • I've thought about validating those numbers (e.g. with a code sent to the user), but the effort seems disproportionate for us.

Is there a good way to handle that besides what I have listed?

  • 1
    What do you mean that sending a code "seems disproportionate for us"? Are you saying it's hard work for the developers? Or the validation isn't really so important after all? Commented Jul 5, 2017 at 13:29

2 Answers 2


In this day and age a landline number doesn't guarantee that is it indeed attached to a landline and not a mobile, a server or some other machine capable of receiving texts (and even in 2005 I remember my parents having a France Telecom-branded cordless phone which could somehow send and receive texts over a standard landline) - just like a mobile number doesn't guarantee the device at the end is capable of receiving texts (a lot of consumer-grade carriers for some reason still allocate mobile numbers to their data SIMs despite most tablets not even having the software stack to handle calls and texts).

So please don't enforce any format on validation on it - you may want to add some help text about some landlines not being able to receive texts if you do detect a landline but still allow the form to be submitted.

  • That's exactly why I don't like strong validation, thanks for the confirmation! I'll probably go with the warning then, unless someone else has a better idea.
    – F.X.
    Commented Jun 5, 2017 at 12:18

As Andre pointed out, there are many different phone services that can lead to you blocking legitimate numbers. And if you branch out of France it will be a nightmare/impossible verifying all those prefixes.

What I would do is strongly point out the purpose of the number is to receive texts, include in the label the phrases "SMS", "mobile phone", or "we will send a text message" and the context will hopefully drive more users to use the correct number.

enter image description here

But as always, you should verify. Send this new phone number a verification text and an input to enter the code. This way you can immediately verify that the phone receives texts and that the user legitimately owns the phone.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.