Skip to content

Instantly share code, notes, and snippets.

@Htbaa
Created August 9, 2012 17:13
Show Gist options
  • Save Htbaa/3306013 to your computer and use it in GitHub Desktop.
Save Htbaa/3306013 to your computer and use it in GitHub Desktop.
Validation::Class woes
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