+ Start a Discussion
Ravi BRavi B 

How to validate Mobile number of a custom field in custem object

Hi all,
  Can anyone help me to validate mobile number in a custom object i.e i have created one custem object inthat i added one field type as mobile custom filed data type is phone i want to give a validation to this field when i am saving that field by using javascript or formulat type

1 it must be 10 digts number and no spaces and no characters allow

 i checked with formul type validation it didnot showing any fiels type of my custom filed(mobile__c)

Ravi B
Use Regex for this validation

Hi Ravi,
You can use the formula in your validation Rule:

NOT(REGEX( Phone, "(\\d){10}"))

If it resolves, Please mark it as solution.