read the first digit of the number of

I'm writing a validation script simple credit card which will be just test it to ensure that the first character (s) of the cc # entered is valid for this type of card (is to say-Visa all start with '4', MC with 51 or 55').
Can someone give me an example of code that will allow me to check for the #Form.ccnumber # first digit (or the first two digits) to make sure they match?
Thanks in advance for any help.

Left(cardNum,1) EQ ' 4'
Left(cardNum,2) EQ '51' GOLD left(cardNum,2) EQ ' 52 "

Tags: ColdFusion

Similar Questions

  • my product key is a bit cleared, and I can't read the number

    my product key is a bit cleared and Word guard invites me to save it, please help, help me obi wan kanobi (bill gates), I can't read the number of your My only help.

    If you are prompted to register, skip-it is not necessary.  If you are being prompted to activate you need not the product key.  We can not help you with that as the product key provided with the product and is unique and there is no record of who has what key to check - not even at Microsoft.

    Here is the Microsoft policy about lost or missing software: http://support.microsoft.com/kb/326246/en-gb.

    I'm sorry, that we cannot be of more assistance.  If bad comes to worse, download and install the FREE OpenOffice Suite (www.openoffice.org), which contains most of the Microsoft Office programs (except Outlook and a few others in the more advanced desktop versions) and at least you won't have to spend more money on the situation.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • sticker on bottom of laptop is faded. can not read the number of product key for Vista

    need a product key to enter because I had to reload everything

    need a product key to enter because I had to reload everything

    Hey kimberlynothis

    If you have already reinstalled vista and you don't know the product key we can not help you

    If you had contacted these forums before you reinstalled vista we helped you with key finder programs

    but as this is a new installation of vista not activated we cannot help you find the product key

    If it is preinstalled, I suggest that you contact the manufacturer of your computer and ask them about recovery disks

    normally, they do not require you to select a product key when you use them to reinstall vista

    you don't say how you reinstalled vista

    Walter, the time zone traveller

  • Read the bus number

    Hello

    I'm new to machine vision and wish you can help me. I would like to read the number of bus of a regular bus image (fig.1). I used OCR training train characters (buses), but I noticed that each image was threshold to read the bus number correctly and when I insert another image, it does not read the number correctly unless I change the threshold sessions. Can I have several files (.abc) and use all of them in my program? Is there another solution rather than using a large number of files (.abc)?

    Second, do you have any suggestion to allocate KING (region of interest) around the bus number automatically without using the mouse? I mean by

    automatically that when I open the image in my program (.vi), it will search the number in the image and then allocates KING around this number.

    Rami

    Rami,

    Unless you can get a homogeneity in your images (i.e. the image comes from the same distance and angle each time), you will encounter this problem. The character set is simply not enough strong to manage the differences in these different images. Its typical use is for images, taken a fixed distance and direction of the target. So, if all of your images will vary in these respects, then a single character set must be created for each instance.

    Best regards

  • XNET: Y at - it a playback feature the number of sessions created?

    Hello

    I want to limit the number of sessions that can be created from a single port. Is there a limiting feature, or I can read the number of sessions created for the selected port.

    Used Board: CAN NI PCI-8512 / HS with two ports

    Thanks in advance for your help.

    Dear Matt

    Thanks for this tip. I changed the question in the automotive forum and embedded networks.

    Concerning

    Adrian

  • How can I know the number of columns and lines on excel file

    How reading the number of columns and rows on an excel file after you open the file in excel with ActiveX.

    Using the example of excel200dem, I read that the file data is excellent.

    However, in this example, I just give the number of lines and columns.

    I want to know the number of lines and columns not giving those in C code automatically.

    Who knows this things? -?

    Help me please.

    Hello

    (1) this forum provides a search option, you must use in doing so, you will find this post

    (2) don't solve you your earlier questions? If so, you must mark responses that have helped you find a solution.

  • Series read reads the available characters

    Hello

    I am trying to contact a Magellan/Ion controller, using RS 485. I'm running an external monitor with shows me 7 bytes sent by the controller for labview, I use the writing basis of VISA then wait a few milliseconds and then VISA read so that the use of the property of bytes to the port say the VISA read the number of bytes to read. When I watch OR spy, I see that read VISA function is told to read 7 bytes of the right address COM, but only six bytes are read. I changed the delay before the time of reading from 0 to so long that it is not read anything and I still have the problem. By a number of bytes that reading VISA has internally that I'm running into timeout or maximum or is there some other solution to my problem?

    It is not at all strange. It is planned. If you do not read ASCII, clear the nature of the expression. VISA read ends as soon as the character is detected.

  • Windows Installer again, the number of COA is unreadable!

    The hard drive on my HP Pavillion Dv5 failed recently, so I had to buy a new one and I then reinstalled Vista using a friends installation disc, however I am unable to read the number of the COA label on the back of my laptop because it is totally unreadable, ink seems to have dispelled all! where and how can I get this resolved?

    Why we also so fragile COA stickers from the type laminated years?

    The hard drive on my HP Pavillion Dv5 failed recently, so I had to buy a new one and I then reinstalled Vista using a friends installation disc, however I am unable to read the number of the COA label on the back of my laptop because it is totally unreadable, ink seems to have dispelled all! where and how can I get this resolved?

    Why we also so fragile COA stickers from the type laminated years?

    How to identify, locate, and replace a product key

    http://support.Microsoft.com/kb/811224

    excerpt...

    How to get a replacement product key

    If the software is preinstalled on your computer, contact your computer manufacturer to obtain a replacement product key.

    To replace a Microsoft product ke for a product you have purchased separately from your computer, you must contact Customer Support and Microsoft. To locate the phone number, visit the following Microsoft Web site:

  • Get the number of VMkernel Ports on a vDS

    I've searched and just can not find the code snippet to read the number of Ports VMkernel on distributed switch.

    Anyone got an excerpt?

    The following PowerCLI command will give you a list of the number of VMKernel ports for all of your distributed switches:

    Get-VDSwitch | Select-Object - property name,

    @{Name = "Number of VMKernel ports"; Expression = {($_ |)} Get-VMHostNetworkAdapter | Where-Object {$_.} {DeviceName as "vmk *"} | Measure - Object). County}}

  • Limit the number of characters in a text based on the first digit field

    Hello and thank you in advance for your help!

    I want to limit the amount of characters in the text field based on the first digit of the number (the text field is limited to a number format... no decimals, no comma).

    For example, if the number starts with a 3, I would limit the text field to allow only ten characters. I have three scenarios but if I could start with code and what is the best place to add (key combination or validation?) I can take it from there. Thanks again for your help!

    I wrote this code for you that does this. Use it as a typo of the custom field code:

    // Validate that only digits are entered
    if (event.change) {
        event.rc = /^\d+$/.test(event.change);
    }
    
    // Validate string length if it starts with 3
    if (/^3/.test(AFMergeChange(event))) {
        event.rc = AFMergeChange(event).length <= 10;
        if (!event.rc) app.alert("If the number starts with \"3\" it may not be longer than 10 digits.",1); // optional error message
    }
    

    You can duplicate the second part of it for additional terms, but keep in mind that this code won't let you even remove the first character in the field if the result is not valid.

    For example, if you enter "234567890123456" then you can't remove the "2" at the beginning because that would result in a number not valid. You can delete all the other numbers, even if and when it is 10 digits or less, then you can remove the departure "2" as well.

  • Read the data in the first column selected in a multicolumn listbox

    When a line is selected in a ListBox multicolumn (1 point), how can I go on reading the data in the first column?

    The listbox multicolumn itself is the digital picture data type. If you have allowed only 1 point selection and selection mode select any row, it returns the line number. The property node 'Element names' to return a table 2d-chains of the elements in your Inbox. The index of the row to the value of the listbox and column 0. See code attached.

  • First character left in file by reading the first line in text file

    When you use the function of reading text from a file file, I noticed that the 1st character is left in the file. I read the line correctly.

    When adding a 2nd line this character is in the file.

    Part vi code is attached.

    Any ideas?

    Thank you.

    Elik

    Can you attach a file of real data and tell us what you mean by "first character". The number of characters per line do you have?

    Can you tell us what you see in the modified file and what you expect to see.

    Everything seems good.

    1. Read you the first line and so the file pointer is just after the first line
    2. You set the size of the file at the end (seems unnecessary, because it does nothing). The file pointer is always right after the first line.
    3. You write the first line you read concatenated with a second line. It will be written on the current file pointer, i.e. after the existing line
    4. The first line is in the file twice, as planned.

    Setting the file size to the 'end' on an existing file does not have something useful. If you want to set the position of the file instead?

    Try to set the file position from and new data will be written at the beginning of the file.

  • read the first character of each line

    Hello!

    I have a problem with the reading of a text file in LabView which I think is pretty easy to do, but since I'm really new to labview (and programming at all) I'm having a hard time to understand.

    So basically, I use the VI 'write file to measure' to write some test results to a text file. I'm just the ones and zeros so the text file looks something like this:

    1.00000

    0.00000

    1.00000

    ..

    and so on.

    I would then import these values in labview but I don't want decimals and I would like that everything on the same line, something like this:

    1 0 1 0 etc etc.

    (the idea is to then be able to convert the values to a hexadecimal number 1-F, if for example the above entry would result in 6.)

    I tried to use the function of text file reading, but I don't know how to convert then the entrance of my desired format.

    Also if you have any idea on how to start playback at the first 1, and then read the next 4 entries contact that would be great as well.

    Any help is really appreciated!


  • Full Table Scan: logical reads are the same as the number of blocks

    Hi people,

    Please see the following execution plan:

    Hash value of plan: 1148783227

    ---------------------------------------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                          | Begins | E - lines. A - lines.   A - time | Pads | Bed |  OMem |  1Mem | Used Mem.

    ---------------------------------------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                               |      1.        |      0 | 00:01:20.23 |     481K |    481K |       |       |          |

    |*  1 |  HASH JOIN |                               |      1.  50351 |      0 | 00:01:20.23 |     481K |    481K |  7902K |  2074K | 7997K (0) |

    |*  2 |   HASH JOIN |                               |      1.  50351 |  31333 | 00:00:01.45 |    3138.   3134 |    17 M |  2295K |   18 M (0).

    |*  3 |    TABLE ACCESS FULL | INS_DCT_BUSINESS_FOLDER |      1.  50351 |    122K | 00:00:00.82 |    2262 |   2260 |       |       |          |

    |   4.    TABLE ACCESS FULL | INS_DCT_CLAIM_DECEASED_FOLDER |      1.  73533 |  76656 | 00:00:00.34 |     876.    874.       |       |          |

    |*  5 |   TABLE ACCESS FULL | INS_COMMON_PARTY |      1.    616K |      0 | 00:01:18.71 |     478K |    478K |       |       |          |

    ---------------------------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - access("THIS_".") PARTY_PK "= 'PARTY1_'." PK")

    2 - access("THIS_".") FOLDER_ID '= 'THIS_1_'.' FOLDER_ID")

    3 filter (("THIS_1_". "STATUS" <>"10" AND "THIS_1_" "." " STATUS' <>' 07 "AND"THIS_1_". ((' ' STATUS ' <>' 08'))

    5 filter (("PARTY1_". "CUSTOMER_ID" LIKE "%#CHAMP290501C #00000 ' AND 'PARTY1_'." CUSTOMER_ID' IS NOT NULL))

    The full table on INS_COMMON_PARTY scan generated 478 K physical IO.

    But the table contains 479K

    SQL > select dba_segments blocks where nom_segment = 'INS_COMMON_PARTY ';

    BLOCKS

    ----------

    479488

    The 10046 trace file shows that each IO get back most of the time 16 blocks:

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 5619 = 27 dba first 1695088 block cnt = 16 obj = #= 19115 tim = 4076488005225

    WAITING #11529215045786738576: nam = "direct path read" ela = 33322 file number = 26 dba first 758658 block cnt = 14 obj = #= 19115 tim = 4076488044875

    WAITING #11529215045786738576: nam = "direct path read" ela = 2140 file number = 26 dba first 758672 block cnt = 16 obj = #= tim 19115 = 4076488053342

    WAITING #11529215045786738576: nam = "direct path read" ela = 205 file number = 26 dba first 758688 block cnt = 16 obj = #= 19115 tim = 4076488054012

    WAITING #11529215045786738576: nam = "direct path read" ela = 2057 file number = 26 dba first 758704 block cnt = 16 obj = #= 19115 tim = 4076488056622

    WAITING #11529215045786738576: nam = "direct path read" ela = 22034 folder = 26 dba first 758720 block cnt = 16 obj = #= tim 19115 = 4076488079117

    WAITING #11529215045786738576: nam = "direct path read" ela = 5516 file number = 26 dba first 758736 block cnt = 16 obj = #= 19115 tim = 4076488085001

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 4914 = 26 dba first 758752 block cnt = 16 obj = #= 19115 tim = 4076488090434

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 7748 = 26 dba first 758768 block cnt = 16 obj = #= tim 19115 = 4076488098836

    WAITING #11529215045786738576: nam = "direct path read" ela = 1046 file number = 9 first dba = 1411 block cnt = 5 obj #= 19076 tim = 4076488101527

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 3882 = 9 first dba = 1424 block cnt = 8 obj #= 19076 tim = 4076488105439

    WAITING #11529215045786738576: nam = "direct path read" ela = 1736 file number = 9 first dba = 1433 block cnt = 15 obj #= 19076 tim = 4076488107310

    WAITING #11529215045786738576: nam = "direct path read" ela = 123 file number = 9 first dba = 1449 block cnt = 15 obj #= 19076 tim = 4076488107616

    WAITING #11529215045786738576: nam = "direct path read" ela = 876 of file = 9 first dba = 1465 block cnt = 15 obj #= 19076 tim = 4076488108814

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 11326 = 9 first dba = 1481 block cnt = 15 obj #= 19076 tim = 4076488120464

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 2497 = 9 first dba = 1497 block cnt = 15 obj #= 19076 tim = 4076488123305

    WAITING #11529215045786738576: nam = "direct path read" ela = 1382 file number = 9 first dba = 1513 block cnt = 15 obj #= 19076 tim = 4076488125037

    WAITING #11529215045786738576: nam = "direct path read" ela = 799 file = 9 first dba = 1529 block cnt = 7 obj #= 19076 tim = 4076488126162

    WAITING #11529215045786738576: nam = "direct path read" ela = 45 file number = 17 dba first = 1920 block cnt = 8 obj #= 19076 tim = 4076488126533

    WAITING #11529215045786738576: nam = "direct path read" ela = 2593 file number = 18 dba first 1794 block cnt = 14 obj = #= 19076 tim = 4076488129290

    WAITING #11529215045786738576: nam = "direct path read" ela = 1727 file number = 18 dba first = 1808 block cnt = 16 obj #= 19076 tim = 4076488131202

    WAITING #11529215045786738576: nam = "direct path read" ela = 7308 file number 18 dba first = 1824 block cnt = 16 obj = #= 19076 tim = 4076488138872

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 514 = 18 dba first = 1840 block cnt = 16 obj #= 19076 tim = 4076488139735

    WAITING #11529215045786738576: nam = "direct path read" ela = 110 file number = 18 dba first 1856 block cnt = 16 obj = #= 19076 tim = 4076488140232

    WAITING #11529215045786738576: nam = "direct path read" ela = 114 file number = 18 dba first = 1872 block cnt = 16 obj #= 19076 tim = 4076488140689

    WAITING #11529215045786738576: nam = "direct path read" ela = 114 file number = 18 dba first 1888 block cnt = 16 obj = #= 19076 tim = 4076488141146

    WAITING #11529215045786738576: nam = "direct path read" ela = 113 file number = 18 dba first = 1904 block cnt = 16 obj #= 19076 tim = 4076488141603

    WAITING #11529215045786738576: nam = "direct path read" ela = 695 of file = 19 dba first 1794 block cnt = 14 obj = #= 19076 tim = 4076488142645

    WAITING #11529215045786738576: nam = "direct path read" ela = 549 of file = 19 dba first = 1808 block cnt = 16 obj #= 19076 tim = 4076488143540

    WAITING #11529215045786738576: nam = "direct path read" ela = 1742 file number = 19 dba first 1824 block cnt = 16 obj = #= 19076 tim = 4076488145588

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 1834 = 19 dba first = 1840 block cnt = 16 obj #= 19076 tim = 4076488147769

    ................................

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 113966 = 19 dba first 52960 block cnt = 16 obj = #= 19076 tim = 4076492053842

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 3173 = 19 dba first 52976 block cnt = 16 obj = #= 19076 tim = 4076492057550

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 3486 = 19 dba first 52992 block cnt = 16 obj = #= 19076 tim = 4076492061390

    WAITING #11529215045786738576: nam = "direct path read" ela = 2288 file number = 19 dba first 53008 block cnt = 16 obj = #= 19076 tim = 4076492064029

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 4692 = 19 dba first 53024 block cnt = 16 obj = #= 19076 tim = 4076492069069

    WAITING #11529215045786738576: nam = "direct path read" ela = 1239 file number = 19 dba first 53040 block cnt = 16 obj = #= 19076 tim = 4076492070657

    WAITING #11529215045786738576: nam = "direct path read" ela = file number 2365 = 19 dba first 53056 block cnt = 16 obj = #= 19076 tim = 4076492073373

    WAITING #11529215045786738576: nam = "direct path read" ela = 227 file number = 19 dba first 53072 block cnt = 16 obj = #= 19076 tim = 4076492073970

    WAITING #11529215045786738576: nam = "direct path read" ela = 215 file number = 19 dba first 53088 block cnt = 16 obj = #= 19076 tim = 4076492074531

    WAITING #11529215045786738576: nam = "direct path read" ela = 204 of file = 19 dba first 53104 block cnt = 16 obj = #= 19076 tim = 4076492075082

    WAITING #11529215045786738576: nam = "direct path read" ela = 198 file number = 19 dba first = 53120 block cnt = 16 obj #= 19076 tim = 4076492075626

    WAITING #11529215045786738576: nam = "direct path read" ela = 217 file number = 19 dba first 53136 block cnt = 16 obj = #= 19076 tim = 4076492076191

    WAITING #11529215045786738576: nam = "direct path read" ela = 216 number of file = 19 dba first 53152 block cnt = 16 obj = #= 19076 tim = 4076492076755

    WAITING #11529215045786738576: nam = "direct path read" ela = 1199 file number = 19 dba first 53168 block cnt = 16 obj = #= 19076 tim = 4076492078302

    .......................................................

    STAT #11529215045786738576 id = 5 cnt = 0 pid = 1 pos = obj 2 = 19076 op ='TABLE ACCESS FULL INS_COMMON_PARTY (cr = 478541 pr = 478534 pw = time 0 = US 98541439 cost = size 141729 = map 132638015 = 616921)'

    To me that the number of e/s is about 479488/16 = 29968 e / s

    Why is the number of e/s so close to the number of blocks?

    Am I missing something here?

    Thanks for your help

    The column entitled "bed" is the number of blocks read, not the number of read requests.

    Concerning

    Jonathan Lewis

  • How to stop zero from the front of the number adobe reader software

    I'm filling out a form that asks for 6 issues. The first digit must be a '0', but when I move to the next field, it drops the '0 '.

    Is there something in the settings to avoid this problem? Thank you.

    If the scope has been defined as having a number format, and then it will hide all the zeros at the beginning of the value entered. However, these zeros are still there, behind the scenes and will be present at the output to export the form data.

    You can report a problem to the creators of the form, but there is nothing you can do about it.

Maybe you are looking for

  • Purchase unlocked IphoneSE UK long term use US

    I'll buy a SE IPhone in the United Kingdom while here for an extended stay. Then, I'll need to use it permanently to the United States. I shared between the two places. It's better to buy an IPhone unlocked to the Apple store or it be difficulties us

  • While ripping CDs a file does not load

    I encountered a problem which I have not seen before.  I am trying to copy a CD and it tells me that the Media window is unable to extract one or more tracks from the CD.  When I go to help on the Web, it tells me I have a COOD10D2 error, how can I f

  • 0000057e__

    I get the above error when you install the following updates 6 for various products that are part of Windows XP Professional desktop.KB973471KB974556KB974811KB975008KB973702KB973444

  • My computer turns on once a week automatically during the night. How can I stop this from happening? Thanks Gunter

    HelloI bought a used desktop computer. After setting it up again to what I had before I find the computer comes on every Saturday night at the same time. How can I stop this from happening?If anyone has an answer for me please give him in singles and

  • Windows 81. Media Pro

    Hello I have a Tablet 11 7139 Pro place and I need to reinstall the OS from scratch - Win8.1Pro 64-bit but, like this do not have media provided I can't work on how to do this. I don't have the license card appropriate - someone knows how to do this?