Jason W May wrote:
>
> I have code in progress that provides a framework for application-
> specific data validation routines.
Hello Jason,
I'm the Data::FormValidator maintainer. I'm also generally a fan
of using less modules to solve a problem when possible, although I realize
sometimes it makes sense to have smaller modules that are good at one thing
rather than a monolithic module that does to much poorly.
I use Data::FormValidator almost exclusively for Web stuff and would
be interested in having it validate credit cards, as in your example.
There a couple issues with this particular example:
* The basic CC number validation is already covered in Business::CreditCard,
and also in Data::FormValidator with "cc_number", "cc_exp", and "cc_type"
* To validate the card more fully, with the address, and expiration
date,
requires a connection to a credit card processor, which seem to have
mostly unique API's to do that.
Still, this would be possible to handle within the framework of
Data::FormValidator, because it has an interface to validate fields
based on multiple inputs, and use custom code to do this. From it's docs,
here's an example of how a credit card validation might happen:
cc_no => {
constraint => "cc_number",
params => [ qw( cc_no cc_type ) ],
},
There a field named "cc_no" is being validated with the "cc_number" constraint,
taking the cc_no and cc_type. It's possible to use a code ref to define
to custom function with more complex checking if you'd like.
With that said could provide some more detail about your project
differentiates
itself from Data::FormValidator?
Thanks,
-mark
. . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
[EMAIL PROTECTED] Summersault, LLC
765-939-9301 ext 223 website development
. . . . . http://www.summersault.com/ . . . . . . .