Thanks:  0
Likes:  0
Dislikes:  0

1. ## Credit Card Validation

In my application, Edit box i entered credit card no like 5939 4856 4565 4565 but the same credit card no is displayed as xxxx xxxx xxxx 4565, how can validate it, can any one please suggest

3. ## Re: Credit Card Validation

Thanks prince,

is there any other workaround??

4. ## Re: Credit Card Validation

Input: Any CC number "4587 4596 4857 4854"
Output: only last 4 digits of CC number displayed "xxxx xxxx xxxx 4854"

cardNumber = "4587 4596 4857 4854"

Dim ccNoLength
Dim last4Digits
Dim temp
ccNoLength = len(ccNo)
last4Digits = right(ccNo,4)
temp = left(ccNo,ccNolength - 4)

'Replace all digits in Temp with X
For i = 0 to len(temp)
If IsNumeric(Mid(temp,i+ 1,1)) Then
temp = Replace(temp, Mid(temp,i+ 1,1),"x",1,1)
End If
Next
temp = temp &amp; last4Digits
End Function

5. ## Re: Credit Card Validation

I know it's common sense for most people, but when I see a function offered, it's great to see an example of it's usage/calling of the function or use of it's output.

would show a message box with xxxx xxxx xxxx 4854 as the value.

or datatable("CC",dtGlobalSheet) = cardNumberPadded to set the runtime datatable with the value.

Just something to help out the newbies a bit.

Otherwise - great function! [img]/images/graemlins/smile.gif[/img]

6. ## Re: Credit Card Validation

Well i did my part, the least anyone else could do is add a msgbox statement or set a break point and debug [img]/images/graemlins/smile.gif[/img] newbies should try and put on some effort so they can learn... being spoon fed all the time won't get em nowhere.

Anyways thank you [img]/images/graemlins/smile.gif[/img]

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.