Feature Requests
Share ideas, discuss and vote on requests from other users in community
 
This object is in archive! 

Field Validation Rules For New User Signup

ICTU LTD shared this idea 4 years ago
Under Consideration

It really annoying when users signup and don't add capital letters to names and addresses. It would be really helpful if we were able to add validation rules to each of the fields on new client signup.

For example force capital letter for first name. Force capital letter for second name. Force capital letter for address line 1 etc. Also a feature such as a email DNS check to make sure the email is correct or a repeat email field to make sure the email is correct.

All in all this features would help in making businesses more professional and eliminate 'school boy errors' on invoices that were automatically generated.

In my case I also encountered a big issue in regards to how the clients signup details are used during domain name registration. I was using the Namecheap domain registrar module and domain registrations were failing because of the simple fact that the clients telephone number was not in the correct format.

WHOIS required the clients numbers to be in the +COUNTRYCODE 123456789 format and because WHMCS doesn't allow the use of a +COUNTRYCODE during signup clients are automatically forced to use the localized version of their number which causes issues.

What would be good is if you could force validation for the phone number in international format based on the country a client selects. This would help keep the system clean, more exact and eliminate errors such as the one described above.

Thanks.

Comments (3)

photo
1

Other could be that the admin of the site can predefine the validation rules of the feelds on the register / login screen.

For example: my registar require the format +CCxxxxxxx

photo
1

Hi,

Clients should enter their phone number as area code + phone number. WHMCS will automatically add the appropriate country code when passing the command to the registrar module based upon the country the client selects as their billing address.

photo
1

It's good that you have commented John and indicated how you think this should work - but It's a real shame that WHMCS doesn't already do this. In my opinion, It's a fundamental, basic requirement that the software should send the correct phone format according to the requirements of each registrar modules' API. In the Nominet module, to use one example, the phone number field has no validation whatsoever, yet the requirements of the registrar are for a very specific format. So when the client enters their phone number when changing the contact details, it is always rejected by the registrar, because WHMCS doesn't format it correctly, it just sends it as typed - and this problem has been around for years without a fix.

While WHMCS does seem to do some formatting of phone numbers in the client's profile details, this same method has not been implemented elsewhere. A frustrating lack of consistency.

I would also argue that in some cases, the phone number used as a domain registration contact may not always be in the same country as the registrants address. It makes much more sense to have a separate country selection on phone numbers so that the numbers can be correctly formatted and used independently. It also allows for the hard coding of dropped trunk codes and cuts down massively on user input errors.

If you simply ask them to enter their phone number and present one box, they could enter it in several different formats before getting it right (according to the rules of the particular form) - but it is so simple to enforce this and ensure the format is correct on the form, with only a small amount of effort.

For best practice, you should have a country code selector next to any phone number field which then prevents the end user from inputting incorrect characters such as + symbol or period. You can also programmatically drop the leading zero or other trunk codes based on the country if the registrar API requires this. A list of all trunk codes can be found here https://en.wikipedia.org/wiki/Trunk_prefix

This way, the client is not required to "second guess" what format to enter and is only responsible for choosing the country and then entering their phone number exactly as they would type it from its location.