I'm basically having validation rule in salesforce to check the whether entered value is in required format or not. However in below formula validation formula for Pan Number is working fine but for Aadhaar Number getting error.
IF(
ISPICKVAL(Proof_id_type__c,"Pan number"),
(LEN(Proof_Id_number__c) != 10) && NOT( REGEX( Proof_Id_number__c , "[A-Za-z]{5}[0-9]{4}[A-z]{1}") ),True
) ||
IF(
ISPICKVAL(Proof_id_type__c,"Aadhar number"),
(LEN(Proof_Id_number__c) != 12) && NOT( REGEX( Proof_Id_number__c , "[0-9]{12}") ) ,True
)
How to solve this if you could help on this.