1HTML::FormFu::ConstrainUts:e:rCaClolnbtarcikb(u3t)ed PerHlTMDLo:c:uFmoernmtFaut:i:oCnonstraint::Callback(3)
2
3
4

NAME

6       HTML::FormFu::Constraint::Callback - Code Callback Constraint
7

VERSION

9       version 2.07
10

SYNOPSIS

12           $field->constraint({
13               type => 'Callback',
14               callback => \&foo,
15           });
16
17           ---
18           elements:
19             - type: Text
20               name: foo
21               constraints:
22                 - type: Callback
23                   callback: "main::my_constraint"
24
25           sub foo {
26               my ( $value, $params ) = @_;
27
28               # return true or false
29           }
30

DESCRIPTION

32       The first argument passed to the callback is the submitted value for
33       the associated field. The second argument passed to the callback is a
34       hashref of name/value pairs for all input fields.
35
36       This constraint doesn't honour the "not()" value.
37

METHODS

39   callback
40       Arguments: \&code-reference
41
42       Arguments: "subroutine-name"
43

SEE ALSO

45       Is a sub-class of, and inherits methods from HTML::FormFu::Constraint
46
47       HTML::FormFu
48

AUTHOR

50       Carl Franks "cfranks@cpan.org"
51

LICENSE

53       This library is free software, you can redistribute it and/or modify it
54       under the same terms as Perl itself.
55

AUTHOR

57       Carl Franks <cpan@fireartist.com>
58
60       This software is copyright (c) 2018 by Carl Franks.
61
62       This is free software; you can redistribute it and/or modify it under
63       the same terms as the Perl 5 programming language system itself.
64
65
66
67perl v5.32.0                      2020-07-H2T8ML::FormFu::Constraint::Callback(3)
Impressum