NAME

Data::FormValidator::Constraints::Business::DK::Phonenumber - a DFV constraints wrapper

VERSION

This documentation describes version 0.10

SYNOPSIS

use Data::FormValidator::Business::DK::Phonenumber qw(valid_dk_phonenumber);

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

my $input_hash;
my $result;

$input_hash = {
    phonenumber  => 1234567,
};

$result = Data::FormValidator->check($input_hash, $dfv_profile);

DESCRIPTION

This module implements experimental Data::FormValidator constraints.

SUBROUTINES AND METHODS

valid_dk_phonenumber

This method validates a string for resemblance to a valid Danish telephone number.

match_dk_phonenumber

This subroutine can be used for untainting a parameter.

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

The module is intended for use with Data::FormValidator.

DEPENDENCIES

INCOMPATIBILITIES

No known incompatibilities at this time.

BUGS AND LIMITATIONS

No known bugs or limitations at this time.

TEST AND QUALITY

TODO

  • Please refer to the distribution TODO file

SEE ALSO

BUG REPORTING

Please report issues via CPAN RT:

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

or by sending mail to

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

MOTIVATION

I have been working in Telco for a long time. So validation and formatting of telephone numbers is something I have seen at lot of. This module is an attempt to sort of consolidate the numerous different regular expression solutions I have seen scathered over large code bases.

AUTHOR

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

COPYRIGHT

Business-DK-Phonenumber and related is (C) by Jonas B. Nielsen, (jonasbn) 2008-2014

LICENSE

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