---
name: "CGI::ValidOp::Check::demographics"
section: "3pm"
platform: "linux"
package: "libcgi-validop-perl"
version: "0.56-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/CGI::ValidOp::Check::demographics"
---

# CGI::ValidOp::Check::demographics(3pm)

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

## NAME

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

## DESCRIPTION

- 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

Randall Hansen \<legless@cpan.org\>

## COPYRIGHT

Copyright (c) 2003-2005 Randall Hansen. All rights reserved.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html
