Please enable JavaScript
Using Pattern.matches() and RegEx, we can validate Phone Number or Mobile Number using Apex in Salesforce. In the following example, I have made sure the Account Phone number field contains only 10 digit number. Blog Post: https://www.infallibletechie.com/2015/09/mobile-number-validation-using-apex-in.html