function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfdc dev 2264sfdc dev 2264 

credit card number validation

Hi,

I have a requirement which i need help

1) i have a email-to-case where once a case gets created in salesforce i need to verify if there is any credit number present and if so i need to make a custom checkbox on case to true based on it i need to show a pop up message on lightning action saying that this case is having credit card number

i tried using workflow regex function but if i enter any number like 012 its making the checkbox to true automatically, please let me know how can i achieve it in salesforce

Thanks in advance
Raj VakatiRaj Vakati
You have an exact solution here 

https://developer.salesforce.com/forums/?id=9060G000000MVKVQA4
Raj VakatiRaj Vakati
http://regexlib.com/REDetails.aspx?regexp_id=49&AspxAutoDetectCookieSupport=1
sfdc dev 2264sfdc dev 2264
I have written the workflow field update like below

AND( 
(Credit_card_number_validation__c) = FALSE, 
(NOT(REGEX( Description , "^((4\\d{3})|(5[1-5]\\d{2})|(6011))-?\\d{4}-?\\d{4}-?\\d{4}|3[4,7]\\d{13}$" )) 

)

but it its working for all even if i have number like 012  in my case description which is not a valid  credit card number how will i make sure that the checkbox field is checked only for a valid credit card number and not for any random number like phone number or date

 
bankcredit bankcreditbankcredit bankcredit
Go to the login region and read through the data. You need an interesting on the web ID and secret phrase to sign in. In a tough situation in Publix login you would need to remain signed in. publix oasis my schedule You can reset your secret phrase by heading off to the overlooked secret phrase interface.
 
Philips saltPhilips salt
Hey there! 
Ye sI have An solution about your problem. Please follow these instructions.

The simplest way to clear up any question about whether your credit card is still active is to call the issuer and ask. Call the number on the back of your card to inquire about the status of your account. For a given credit card number: Double the value of every other digit from right to left, beginning with the second to last digit. Add the digits of the results of Step 1 to the remaining digits in the credit card number. If the result mod 10 is equal to 0, the number is valid.

For validating online card checker (https://seotoolsystem.com/credit-card-validator), you might have to reach the financial service provider and ask the manager to verify it. But before you reach out to them, the online card validator can help you verify whether the credit card number is valid or not.

Thanks