Phone number validation is forcing the registrant to enter the correct phone format “(###) ###-####” in order for the registration form to be completed. This does assure that correct format for a phone number is entered however it can create a number of issues when someone is trying to complete your registration form. Some issues are:
It could be an international phone number in a different format
the person has an extension to their phone number
Makes the form more difficult to complete
Risk of frustration and not completing the form
ePly typically, does not recommend to include a phone number validation but if one is needed there are a couple of solutions:
Select Phone Validation - this will force the “(###) ###-####” and also allow for extensions.
First click on contact information
Next click on 'Phone Number'
Click Add Validation
Select 'Phone Number' - this will force the “(###) ###-####” format.
Enter an 'Error Message' - this will appear if not entered properly (shown below)
Custom Validation -this is an advanced feature where custom code is entered for the validation. Example is ( ^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})$) this code allows for North American number format 7, 10 and 11 digits with or without hyphens.
To add this custom validation:
In the 'Validation Type' drop down box select 'Custom' and click "Save" for more options to show up.
Change the Error Message' to Valid Phone Number - this is the message which will appear if not entered properly.
In the 'Initial Value' field enter in phone as the name of the entry.
Next in the Valid Expression' field copy in the following code ^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})$
Click on 'Save'.
The error will display, as shown below, when not entered properly.
Comments
0 comments
Article is closed for comments.