[Html-widget] Callback Constraint with multiple values?

Roland Moriz roland at moriz.de
Mon Jun 5 17:42:45 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

is there a way to have a Callback Constraint and multiple fields?

e.g.

$w->constraint('Callback', 'username', 'password')->callback(sub {
      my $username = shift;
      my $password = shift;
      my $user = $c->model('DB1::User')->find({ email => $username,
password => $password });
      defined($user) ? return 1 : return 0;
})->message('Password wrong or Account not existing.');


Thank you!

- --
Mit freundlichen Gruessen,
with best regards,

Roland Moriz

- --
http://www.perl-freelancer.com/
http://www.roland-moriz.de/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEhFD1HkigiUjSNxsRAjB5AJ0e8lErlRBLI/cAcyI0JcERD8+tdQCeOAJr
Rh8F/1UL1EBahJ3n+uSFwDQ=
=XD16
-----END PGP SIGNATURE-----



More information about the Html-widget mailing list