10 digit mobile number validation in javascript w3schools code example Example: 10 digit mobile number validation pattern in javascript \(?\d+\)?[-.\s]?\d+[-.\s]?\d+