+ Start a Discussion
Balaji B 10Balaji B 10 

custom validation rule to check mobile number format, email format for custom object?

Best Answer chosen by Balaji B 10
Dhanya NDhanya N
Hi Balaji,

Please Check this formula.
AND(
NOT(REGEX( Phone__c , "\\D*?(\\d\\D*?){10}")), 
NOT(REGEX( Email__c ,'([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})'))
 )

Thanks
Dhanya