Active
Project:
Mobile Number
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2016 at 18:26 UTC
Updated:
8 Sep 2016 at 11:51 UTC
Jump to comment: Most recent
Currently, SMS Framework 8.x-1.x integrates with Telephone field and has a number ownership verification system of it's own. To create less confusion, it should be decided where and how to implement the verification in a single place, with sms functionality relying on SMS Framework and mobile number validation relying on Mobile Number module as a field type.
Comments
Comment #2
dpiNumber validation
I had in mind that SMS Framework would use the standard telephone field, and rely on modules such as (or similar to) telephone_validation.
Metadata
I think the only reason the field should fail is if the phone number is unacceptable for some reason, it shouldn't restrict editing the entity in any way.
Verification code
As a part of creating the SMS Framework phone number verification system, I proposed adding a verification code generator system (see #2643692: SMS User Redesign: "Verification Code System"). However this is was and is still low priority. We can reach parity, if this is indeed a desirable requirement.
Comment #3
dpiYou can derive the country for the phone number in multiple ways:
I dont have any other point other than to say it can be done dynamically when required. If the country needs to be Views-able then making use of a country field would be ideal if possible.
Comment #4
nyariv commentedIt's not just with views, also rules, token, etc.
If country/timezone is a separate field then it can not be assured to belong to the origin of the number. You may have entities with multiple telephone fields, and you will need to match each one with its country field, and handling multi value fields would be a nightmare.
The country attribute just needs to be coupled with the number value. It could be argued that local_number and country together should replace value (E164), but again it would require computation every time you wanted to use the full number, which is not good for views/rules/etc.
Comment #5
nyariv commentedIt's like saying the address module should contain only one string value for the full address and all attributes (city, street, etc) would be computed when needed.
Comment #6
nyariv commentedI believe verification should be part of validation, it is optional for Mobile Number, and when used with combination of uniqueness validation it allows giving the field a more valuable purpose, such as identifying a user by mobile number or two factor authentication.
There are some cases where you want to prevent saving an entity if number is not verified.
Comment #7
dpiTake a look at #2797121: Separate entity phone number from verification service for flexibility.