I have a custom filed with number datatype and I have a requirement the the field should always start with 304050 and I have to write a condition that it must always contain 16 digits.
Is this posible?
Can someone help me with this?
I have a custom filed with number datatype and I have a requirement the the field should always start with 304050 and I have to write a condition that it must always contain 16 digits.
Is this posible?
Can someone help me with this?
Ashwini's answer is correct with small change......
OR
(
LEFT(TEXT(field__c),6) != '304050',
LEN(TEXT(field__c)) != 16
)
You can try something similar like this in validation rule using three functions (OR, LEFT, LEN):
OR
(
(LEFT(field__c,6) != '304050',
LEN(field__c) != 16
)
Solution is for your hint purpose. may not be 100% correct.