Lyle wrote:
Joshua Miller wrote:
Joshua,
Have you managed to figure out a work around for:-
'constraints' => {
'password1' => {
'constraint' => "check_passwords",
'params' => [ qw( password1 password2 ) ],
},
},
...
sub check_passwords {
my ( $pw1, $pw2 ) = @_;
if ( $pw1 eq $pw2 ) {
return 1;
} else {
return 0;
}
}
I've just tried this code in DFV and I can't get it working? I'm getting
the error
"No constraint found named 'must_match' at Data/FormValidator/Results.pm
line 965."
Can't seem to figure out what I'm missing...
Should be working according to the guide I followed at:-
http://search.cpan.org/~purdy/Data-FormValidator-Tutorial-1.61/lib/Data/FormValidator/Tutorial.pm
Has anyone got this working? Do I have to put the sub in a special
package or pass it to DFV in some way?
Lyle
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################