Jump to content
cluster

7.4 Phone Number Validation - Dot required

Recommended Posts

I have disabled this feature https://docs.whmcs.com/Phone_Numbers

but after the update all phone numbers were changed and a "." dot are placed between countrycode an local number:

+33.11111111 (before the update +3311111111)

I can not change it anymore and even my registrar module does not work anymore because of using the dot in phone number

 

Share this post


Link to post
Share on other sites
2 hours ago, cluster said:

but after the update all phone numbers were changed and a "." dot are placed between countrycode an local number:

they're only changed if you edit them and the feature is enabled.. if you disable the feature and edit a number, the number stored in the database is what you type - yes it will still show +33. (or whatever) in the profile, but in the database it will be exactly what you entered... even the docs confirm this now...

Quote

When enabled, the client's phone number saved in the database will automatically be prefixed by the international country dialling code. When disabled, this will not be added automatically to the database value, but will still be reflected in the UI.

2 hours ago, cluster said:

I can not change it anymore and even my registrar module does not work anymore because of using the dot in phone number

which registrar? is it a third-party registrar module or WHMCS ? if third-party, you'd need to ask them about this change and how it affects the module.

but as I said, if disabled the table should store the value you enter and won't add any dots to it.

Share this post


Link to post
Share on other sites

We've made sure that the data provided to registrar modules is the same as it has been previously.

If you built the number manually, then you can still do that. We do have a registrar that doesn't utilise the . after the country code, and for that, we so a simple str_replace at the point of use on the full formatted phone number.

Share this post


Link to post
Share on other sites
27 minutes ago, WHMCS Andrew said:

We've made sure that the data provided to registrar modules is the same as it has been previously.

If you built the number manually, then you can still do that. We do have a registrar that doesn't utilise the . after the country code, and for that, we so a simple str_replace at the point of use on the full formatted phone number.

 

OK thanks I will try a  str_replace in the module

Share this post


Link to post
Share on other sites

Hello Guys,

I was not able to solve this issue, I have added a str_replace into the module, but it still shows the same error message (also deleted files from templates_c)

'phonenumber' => str_replace(".", "", $params['phonenumber']),
An Error Occurred
Parameter value policy error ; [contact:admin: Your phone number must use the following format: +999999999 (starting with +country code) contact:tech: Your phone number must use the following format: +999999999 (starting with +country code) contact:billing: Your phone number must use the following format: +999999999 (starting with +country code) contact:org: Your phone number must use the following format: +999999999 (starting with +country code)]

could it be that the + sign are removed from POST data?

 

Edited by cluster

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines