Created
August 9, 2012 17:13
-
-
Save Htbaa/3306013 to your computer and use it in GitHub Desktop.
Validation::Class woes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Foo; | |
use Validation::Class; | |
field 'foobar' => { | |
required => 1, | |
filters => 'numeric', # Comment this one out to make it work | |
default => [1,2], | |
}; | |
package main; | |
use v5.12; | |
use Data::Dumper; | |
use strict; | |
my $input = Foo->new(params=>{foobar => [1]}); | |
my $foobar = $input->foobar(); | |
say Dumper($foobar); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment