File: 02-alpha.t

package info (click to toggle)
libvalidation-class-perl 7.900057-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,572 kB
  • ctags: 355
  • sloc: perl: 21,493; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use Test::More tests => 1;

# load module
package MyVal;
use Validation::Class;

package main;

my $v = MyVal->new(
    fields => {foobar => {filters => 'alpha'}},
    params => {foobar => 'acb123def456xyz'}
);

ok $v->params->{foobar} =~ /^acbdefxyz$/, 'alpha filter working as expected';