You need to sign in to do that
Don't have an account?
anillll
Mobile number should not take alphabets and special characters
I have written this code but its not taking
String phoneNumber = eachMob.Contact_Number_Mobile__c;
Pattern isnumbers = Pattern.Compile('^[0-9]+$');
Matcher MobileMatch = isnumbers.matcher(phoneNumber);
if(MobileMatch.Matches())
String phoneNumber = eachMob.Contact_Number_Mobile__c;
Pattern isnumbers = Pattern.Compile('^[0-9]+$');
Matcher MobileMatch = isnumbers.matcher(phoneNumber);
if(MobileMatch.Matches())
Hi Anil,
This (http://forceguru.blogspot.com/2011/06/using-regex-in-validations.html) post might help you
Thanks,
N.J
You can also use Javascript.
/Raghu