
I want to apply this to Leads & Contacts
*This post is locked for comments
I have the same question (0)I think I got it actually for anyone else who's interested:
//Validate phone number for 10 digit US numbers.
function validatePhone(phoneField, format) {
// Get the field that fired the event.
var oField = event.srcElement;
//format - Integer value that defines how to format the text field.
var num = oField.value.replace(/[^\d]/g,'');
if(num.length != 10) {
//Alert the user that the phone number entered was invalid.
alert('Please enter a valid phone number including area code');
}
}