CGI::ValidOp::Check::demographics - CGI::ValidOp::Check module to validate various demographics.


CGI-ValidOp documentation  | view source Contained in the CGI-ValidOp distribution.

Index


NAME

Top

CGI::ValidOp::Check::demographics - CGI::ValidOp::Check module to validate various demographics.

DESCRIPTION

Top

default

Should die.

us_state2

Passes if value is a valid United States 2-letter abbreviation, as determined by the USPS: http://www.usps.com/ncsc/lookups/usps_abbreviations.html.

us_ssn($constraint)

Passes if value is a 9-digit integer with optional dashes (e.g. 123-45-6789). If $constraint is integer the dashes are stripped:

    # given CGI variable 'ssn' equal to '123-45-6789'
    $ssn = $cgi->param( 'ssn', [ 'demographics::ssn' ]);            # eq '123-45-6789'
    $ssn = $cgi->param( 'ssn', [ 'demographics::ssn(integer)' ]);   # eq '123456789'

AUTHOR

Top

Randall Hansen <legless@cpan.org>

COPYRIGHT

Top


CGI-ValidOp documentation  | view source Contained in the CGI-ValidOp distribution.