> ------ Forwarded Message
> From: "Maryana Osipchuk" <[EMAIL PROTECTED]>
> When I try using this one (as constraint rule - my own function)
> --
> p1 => {
>               constraints => valid_equiv,
>               params => [qw (p1 p2)]
>       }
> valid_equiv as &main::valid_equiv
> --
> I receive an error(something like that):
> 'Undefined subroutine &HTML::FormValidator::valid_ called at
> C:/Perl/lib/HTML/FormValidator.pm line 401'

Hello Maryana,

First, if you just learning HTML::FormValidator, I suggest looking into
Data::FormValidator. It contains all the old functions plus a few new features.

In your case, I think your solution may be found an example in the
documentation which looks like this:

    {
        customer_infos => {
             constraints => {
                cc_no      => {  constraint  => "cc_number",
                                 params      => [ qw( cc_no cc_type ) ],
                                },
                }
        }


# cc_no is the field name with the constraint
# cc_number is the custom function

   -mark

Reply via email to