+ Start a Discussion
RAVIKUMAR GOVINDANRAVIKUMAR GOVINDAN 

Regular expressions for Phone number Validation

phone number should accpet only one + symbol at the starting followed by 10 digit number it should not accept +   in the middle or end .
 "^\\D*+([0-9 ]+)*"
 it accepting + symbol at starting .
Amit Chaudhary 8Amit Chaudhary 8
Please try below example.

Example 1:- NOT( OR( ISBLANK(Phone), REGEX( Phone,"(\\D?[0-9]{3}\\D?)[\\s][0-9]{3}-[0-9]{4}")))

Example 2:-
http://salesforce.stackexchange.com/questions/42481/regex-validation-rule-for-telephone-number
http://forceguru.blogspot.in/2011/06/using-regex-in-validations.html

Example 3:-
https://help.salesforce.com/apex/HTViewSolution?id=000187896&language=en_US (https://help.salesforce.com/apex/HTViewSolution?id=000187896&language=en_US)

Please let us know if now this will help u
 
Igor PetrovychIgor Petrovych
If you need a more advanced validation of a number, to make sure you really have a valid number - you can do that in the trigger handler, and use a ported libphonenumber (http://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000G12oJUAR) library.