Lyo Kato > FormValidator-Simple-Plugin-CreditCard > FormValidator::Simple::Plugin::CreditCard

Download:
FormValidator-Simple-Plugin-CreditCard-0.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.03   Source  

NAME ^

FormValidator::Simple::Plugin::CreditCard - credit card number validation

SYNOPSIS ^

    use FormValidator::Simple qw/CreditCard/;

    my $q = CGI->new;
    $q->param( number => '5276 4400 6542 1319' );

    my $result = FormValidator::Simple->check( $q => [
        number => [ 'CREDIT_CARD' ],
    ] );

DESCRIPTION ^

This modules provides credit card number validation.

See Business::CreditCard

CARD TYPE CHECK ^

You can also check card type.

    my $result = FormValidator::Simple->check( $q => [
        number => [ ['CREDIT_CARD', 'VISA', 'MASTER' ] ],
    ] );

In this sample, it returns true if the number is Visa Card or Master Card. You can choose card type from follow listing.

VISA
MASTER
DISCOVER
AMEX
DINERS
ENROUTE
JCB
BANKCARD
SWITCH
SOLO

SEE ALSO ^

FormValidator::Simple,

Business::CreditCard

AUTHOR ^

Lyo Kato <lyo.kato@gmail.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2005 by Lyo Kato

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself

syntax highlighting: