You need to sign in to do that
Don't have an account?
Shweta Dwivedi
validation rule using Regex
Create a validation rule on a 12 digit number field for the following condition.
1) All 12 digit number should not be same. (1111 1111 1111),
2) 3 consecutive numbers should not be same (1112 2223 3334) ,
3) Field length= 12.
1) All 12 digit number should not be same. (1111 1111 1111),
2) 3 consecutive numbers should not be same (1112 2223 3334) ,
3) Field length= 12.
Use the below-mentioned formula to satisfy all the conditions and give a proper error message.
(Note:- It will only accept numbers)
Lets suppose name of the field is "NoRepeat__c".
OR(NOT(ISNUMBER(NoRepeat__c)),
CONTAINS(NoRepeat__c, '111'),
CONTAINS(NoRepeat__c, '222'),
CONTAINS(NoRepeat__c, '333'),
CONTAINS(NoRepeat__c, '444'),
CONTAINS(NoRepeat__c, '555'),
CONTAINS(NoRepeat__c, '666'),
CONTAINS(NoRepeat__c, '777'),
CONTAINS(NoRepeat__c, '888'),
CONTAINS(NoRepeat__c, '999'),
CONTAINS(NoRepeat__c, '000'))
Please mark the answer as best answer if the information is informative so that the question is removed from an unanswered question and appear as a proper solution.