Skip Menu |

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

Report information
The Basics
Id: 95701
Status: resolved
Priority: 0/
Queue: Params-Validate

People
Owner: Nobody in particular
Requestors: jim [...] nortx.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 1.14-TRIAL



Subject: Provide a means to return a custom failure message from callback validation
I would like to be able to supply a message describing why a particular callback function failed to validate. I understand that this might be problematical given that the existing true/false mechanism precludes simply returning a string. As an example, if I were validating a list of user IDs, I might want to return a msg that said "ID's xxxx, yyyy and zzzz are not valid users" instead of returning a 0 (or undef) and having the caller see the generic callback failed message. Conceivably this might be accomplished by being able to "die" within a callback with a suitable message and that be used. This might be somewhat easier in the PP version, but I would not be surprised to hear that the XS version would present a challenge.