in reply to Example of complex constraint with HTML::FormValidator
...where you can either use a subroutine checkField() or replace it with a short test right there in the anonymous subroutine.constraints => { myfield => { constraint => sub { return (checkField() ? 1 : 0) }, params => [qw(myfield, otherparam1, otherparam2)], }, ... }
There is an example in the documentation for the module, but it uses a built-in validation routine rather than an anonymous subroutine...
buckaduck
|
|---|