Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bleargh45/data-formvalidator-constraints-numberphone
Data constraints, using Number::Phone
https://github.com/bleargh45/data-formvalidator-constraints-numberphone
constraints data-formvalidator telephone-number-validation telephone-numbers
Last synced: about 1 month ago
JSON representation
Data constraints, using Number::Phone
- Host: GitHub
- URL: https://github.com/bleargh45/data-formvalidator-constraints-numberphone
- Owner: bleargh45
- Created: 2021-01-17T23:43:06.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-12T20:11:06.000Z (over 1 year ago)
- Last Synced: 2023-08-20T22:30:26.638Z (about 1 year ago)
- Topics: constraints, data-formvalidator, telephone-number-validation, telephone-numbers
- Language: Perl
- Homepage: https://metacpan.org/release/Data-FormValidator-Constraints-NumberPhone/
- Size: 37.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
Data::FormValidator::Constraints::NumberPhone - Data constraints, using Number::Phone
# SYNOPSIS
```perl
use Data::FormValidator::Constraints::NumberPhone qw(FV_american_phone);constraint_methods => {
phone => FV_american_phone(),
canada_phone => FV_american_phone(qw( CA )),
},
```# DESCRIPTION
This module implements methods to help validate data using
`Data::FormValidator` and `Number::Phone`.# METHODS
- FV\_american\_phone()
Creates a constraint closure that returns true if the constrained value
appears to be a valid North American telephone number (Canada, or US)- FV\_telephone(@countries)
Creates a constraint closure that returns true if the constrained value
appears to be a valid telephone number.REQUIRES a list of Country Codes (e.g. "CA", "US", "UK"), to specify which
countries should be considered valid. By default, \*NO\* countries are
considered valid (and thus, no numbers are considered valid by default).# AUTHOR
Graham TerMarsch ([email protected])
# COPYRIGHT
Copyright (C) 2012, Graham TerMarsch. All Rights Reserved.
# SEE ALSO
- [Data::FormValidator](https://metacpan.org/pod/Data%3A%3AFormValidator)
- [Number::Phone](https://metacpan.org/pod/Number%3A%3APhone)