# ... This is part of the validator profile ... constraints => { ... holidayto => { params => [ qw/ holidayfrom holidayto / ] constraint => sub { my $from = shift; my $to = shift; # Perform some check with Date::Calc... } } , ... }