Skip Menu |

This queue is for tickets about the MooseX-Params-Validate CPAN distribution.

Report information
The Basics
Id: 46330
Status: open
Priority: 0/
Queue: MooseX-Params-Validate

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
kane [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Can't set validation_options() for P::V
MX::P::V doesn't allow me to pass any validation_options using validate_with, meaning the only way to set options is via the rather ugly: { package MooseX::Params::Validate; use Params::Validate (); Params::Validate::validation_options( allow_extra => 1, # unknown keys are silently ignored ); } Which also means they're immediately global, and no longer per package. Would be nice to have a cleaner way to do this.
From: lamoz [...] adriver.ru
Show quoted text
> allow_extra => 1, # unknown keys are silently ignored
+1 I'm specifically interested in on_fail or some way of throwing exception objects.
This was partially addressed in the latest release, which allows you to set allow_extra on a per-call basis.
On Tue Aug 10 06:51:48 2010, lamoz wrote: Show quoted text
> I'm specifically interested in on_fail or some way of throwing exception > objects.
Me too. I don't want to throw an exception; I want to capture the list of parameter(s) that didn't validate, and the strings associated with each, so I can react accordingly (e.g. by logging an error message).