You need to sign in to do that
Don't have an account?

SSN Format Validation
Hi,
I have a requirement on a SSN field :-
- Should include dashes
- Should not be less than or more than 10 digits
Please assist in creating a validation rule for same.
Thanks,
Vimal
Sorry, it should be 9 digits* with 2 dashes.
I am trying with this validation rule. Can anyone tell me where I am going wrong?
OR(AND(LEN (SSN_TIN__pc) <> 11, NOT(ISBLANK(SSN_TIN__pc))), NOT(REGEX(SSN_TIN__pc, "[0-9]{3}-[0-9]{2}-[0-9]{4}")))
Thanks,
Vimal
Hope this one helps:
NOT(
OR(
LEN (Social_Security_Number__c) = 0,
REGEX( Social_Security_Number__c , "[0-9]{3}-[0-9]{2}-[0-9]{4}")
))
Hi ,
Not(REGEX(Social_Security_Number__c , "[0-9]{3}-[0-9]{2}-[0-9]{4}" ))
I hope this will resolve your issue.
We have a free application in the Appexchange that does US Social Security Number validation and much others (IBAN, VAT, BIC...), without any Apex code and is updated including the newly supported countries every release.
Check this out: https://goo.gl/HHZ4c3
I hope this helps you and give us feedback to improve it.