You need to sign in to do that
Don't have an account?
venkateshyadav1243
Validation rule for phone numer
Hi
i need validation rule for phone number
it should be number it will not allow string and special character and it can be more than 10 digits how can i write the validation rule.
IF(
ISBLANK( MobilePhone ) , false , NOT(REGEX(MobilePhone, "\\D*?(\\d\\D*?){10}")))
i write one it accepting only 10 i need it can accept any number means more than 10 or less than 10.
Can any one help me.
Regards
venkatesh.
Hi,
You can simply achieve this using functions ISBLANK and ISNUMBER in your validation rule. Ex:
OR(ISBLANK(MobilePhone), NOT(ISNUMBER(MobilePhone)))
Try this validation rule :-
IF(
ISBLANK( MobilePhone ) , false , NOT(REGEX(MobilePhone, "\\D*?(\\d\\D*?){1,20}")))
I have kept a limit of 1-20 so you can enter upto 20 digits.
so now it will allow number less than 10 and more than 10 upto 20 digits.
Hi,
Use the below Validation Rule.It won't accept String and Special Characters.
It accept numbers more than or less than 10 digits.
NOT(REGEX( mobile__c ,"^[0-9]*$"))
Please mark my answer as a solution, it its correct.Dont forget to give kudos if its working perfectly.
Regards,
Nithya kalyani.C / Salesforce Developer
Hi,