You need to sign in to do that
Don't have an account?
lavanya gottumukkala
How to write validation rule for PANCARD number using REGEX function for a picklist field?
Hi All,
I have one picklist field with values like PAN,TAN,VAT,etc.....And I need to write a validation rule for the format of PAN number for that picklist field.Is it possible?
I have written the below formula but didn't work
NOT(REGEX(ISPICKVAL(PANCARD__c ,"((([a-zA-Z]{5})\\d{4})[a-zA-Z]{1})"))
Any one has any idea?It's urgent
Thanks in advance
I have one picklist field with values like PAN,TAN,VAT,etc.....And I need to write a validation rule for the format of PAN number for that picklist field.Is it possible?
I have written the below formula but didn't work
NOT(REGEX(ISPICKVAL(PANCARD__c ,"((([a-zA-Z]{5})\\d{4})[a-zA-Z]{1})"))
Any one has any idea?It's urgent
Thanks in advance
Try below formula.
//In Place of piclistfield use the api name of the picklist field containing PAN,TAN,VAT,etc... values.
NOT(AND(ISPICKVAL(picklistfield,'PAN'),REGEX(PANCARD__c, "[a-zA-Z]{5}-[0-9]{4}-[a-zA-Z]{1}"))).
Let me know if more help needed or any quiries.
Please mark this as answer if it works.
Please use the validation rule, it will be work.
NOT( REGEX( PAN_Number__c , "[A-Za-z]{5}[0-9]{4}[A-z]{1}") )