Data-Validate-WithYAML
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
t/22_config_as_string.t view on Meta::CPAN
use strict;
use Test::More;
use FindBin;
BEGIN {
use_ok( 'Data::Validate::WithYAML' );
}
my $file = $FindBin::Bin . '/test.yml';
my $yaml = do{ local (@ARGV, $/) = $file; <> };
my $validator = Data::Validate::WithYAML->new( \$yaml );
is $Data::Validate::WithYAML::errstr, '';
my @valid_addresses = ('test@test.de','firstname.lastname.something@sub.domain.tld');
is($validator->check('email',$_),1,$_) for @valid_addresses;
my @invalid = ('asdf','@asdsadf','@asdf.de','asdf@asdf','asdf@asdf.asdfasdfasdf');
is($validator->check('email',$_),0,$_) for @invalid;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.507 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )