Jason W May wrote:
>
> Data::FormValidator is the closest of the lot to what I'm looking
> for. Here's what's missing:
>
> * straightforward extension of the set of validation functions,
> or alteration of the existing functions (e.g. changing the
> built-in email validation rule)
>
> * rules that take more than one input, e.g. validating a postal
> code depending on the country.
Hello Jason,
Data::FormValidator already both these cases (extensions and multi-input
validation). However, "straightforward" may be in question. :) Here's an
example syntax to show this off. The first bit is straight from the documentation:
constraints => {
# Use the built-in "cc_no" constraint with multiple inputs
cc_no => { constraint => "cc_number",
params => [ qw( cc_no cc_type ) ],
},
# validate a postal code depending on the country code with your own function
postal_code => {
constraint => \&my_postal_code_validation,
params => [ qw( postal_code country_code ) ],
},
}
########################
I think what's not entirely clear is the documentation for this. It's
hard for me
to describe a complex data structure like the above in plain english.
Perhaps the documentation just needs more examples or better structure.
Suggestions welcome. :)
-mark
. . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
[EMAIL PROTECTED] Summersault, LLC
765-939-9301 ext 223 website development
. . . . . http://www.summersault.com/ . . . . . . .