NAME

Data::FormValidator::Constraints::Business::DK::Postalcode - constraint for Danish Postal codes

VERSION

The documentation describes version 0.01 of Data::FormValidator::Constraints::Business::DK::Postalcode

SYNOPSIS

use Data::FormValidator;
use Data::FormValidator::Constraints::Business::DK::Postalcode qw(valid_postalcode);

  my $dfv_profile = {
      required => [qw(postalcode)],
      constraint_methods => {
          postalcode => valid_postalcode(),
      }
  };

  my $dfv_profile = {
      required => [qw(postalcode)],
      constraint_methods => {
          postalcode => valid_postalcode(),
      },
      untaint_all_constraints => 1,
  };

DESCRIPTION

This module exposes a set of subroutines which are compatible with Data::FormValidator. The module implements contraints as specified in Data::FormValidator::Constraints.

For a more through description of Danish postal codes please see: Business::DK::Postalcode.

SUBROUTINES AND METHODS

valid_postalcode

Checks whether a Postalcode is valid (see: SYNOPSIS) and Business::DK::Postalcode

match_postalcode

Untaints a given Postalcode (see: SYNOPSIS and BUGS AND LIMITATIONS)

postalcode

A simple wrapper for "match_postalcode"

EXPORTS

Data::FormValidator::Constraints::Business::DK::Postalcode exports on request:

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

The module requires no special configuration or environment to run.

DEPENDENCIES

INCOMPATIBILITIES

The module has no known incompatibilities.

BUGS AND LIMITATIONS

The tests seem to reflect that untainting is taking place, but the "match_postalcode" is not called at all, so how this untaiting is expected to be integrated into Data::FormValidator is still not clear to ne (SEE: TODO)

TEST AND QUALITY

Coverage of the test suite is at 57.6%

TODO

  • Get the untaint functionality tested thoroughly, that would bring the coverage to 100%, the "match_valid_postalcode" does not seem to be run.

  • Comply with Data::FormValidator, especially for untainting

SEE ALSO

BUG REPORTING

Please report issues via CPAN RT:

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business-DK-Postalcode

or by sending mail to

bug-Business-DK-Postalcode@rt.cpan.org

AUTHOR

Jonas B. Nielsen, (jonasbn) - <jonasbn@cpan.org>

COPYRIGHT

Data::FormValidator::Constraints::Business::DK::Postalcode is (C) by Jonas B. Nielsen, (jonasbn) 2006-2012

LICENSE

Business-DK-Postalcode and related is released under the Artistic License 2.0

  • http://www.opensource.org/licenses/Artistic-2.0